* @param name The name to set resolved link name to. This can be null.
* If null, it sets the link resolved name field to null.
* @see #getLinkResolvedName
*/
public void setLinkResolvedName(Name name) {
if (name != null) {
this.linkResolvedName = (Name)(name.clone());
} else {
this.linkResolvedName = null;
}
}
/**
* Sets the remaining link name field of this exception.
*<p>
* <tt>name</tt> is a composite name. If the intent is to set
* this field using a compound name or string, you must
* "stringify" the compound name, and create a composite
* name with a single component using the string. You can then
* invoke this method using the resulting composite name.
*<p>
* A copy of <code>name</code> is made and stored.
* Subsequent changes to <code>name</code> does not
* affect the copy in this NamingException and vice versa.
*
* @param name The name to set remaining link name to. This can be null.
* If null, it sets the remaining name field to null.
* @see #getLinkRemainingName
*/
public void setLinkRemainingName(Name name) {
if (name != null)
this.linkRemainingName = (Name)(name.clone());
else
this.linkRemainingName = null;
}
/**
* Sets the link resolved object field of this exception.
* This indicates the last successfully resolved object of link name.
* @param obj The object to set link resolved object to. This can be null.
* If null, the link resolved object field is set to null.
* @see #getLinkResolvedObj
*/
public void setLinkResolvedObj(Object obj) {
this.linkResolvedObj = obj;
}
/**
* Generates the string representation of this exception.
* This string consists of the NamingException information plus
* the link's remaining name.
* This string is used for debugging and not meant to be interpreted
* programmatically.
* @return The non-null string representation of this link exception.
*/
public String toString() {
return super.toString() + "; Link Remaining Name: '" +
this.linkRemainingName + "'";
}
/**
* Generates the string representation of this exception.
* This string consists of the NamingException information plus
* the additional information of resolving the link.
* If 'detail' is true, the string also contains information on
* the link resolved object. If false, this method is the same
* as the form of toString() that accepts no parameters.
* This string is used for debugging and not meant to be interpreted
* programmatically.
*
* @param detail If true, add information about the link resolved
* object.
* @return The non-null string representation of this link exception.
*/
public String toString(boolean detail) {
if (!detail || this.linkResolvedObj == null)
return this.toString();
return this.toString() + "; Link Resolved Object: " +
this.linkResolvedObj;
}
/**
* Use serialVersionUID from JNDI 1.1.1 for interoperability
*/
private static final long serialVersionUID = -7967662604076777712L;
};
=3=
THE END |