This is used for both NameClass and Binding.
Lazy eval - so the extra methods in Binding don't affect us.
For most contexts we'll deal getting the class name is as expensive
as getting the object. In addition most operations will only use the name.
| Method from org.apache.naming.core.ServerBinding Detail: |
public String getClassName() {
if( className!=null ) return className;
if( boundObj==null ) lookup();
if( boundObj!=null )
className=boundObj.getClass().getName();
return className;
}
|
public String getName() {
return name;
}
|
public Object getObject() {
if( boundObj!=null )
return boundObj;
lookup();
return boundObj;
}
|
public boolean isRelative() {
return isRel;
}
|
public void recycle() {
}
|
public void setClassName(String name) {
this.className = name;
}
|
public void setName(String name) {
this.name = name;
}
|
public void setObject(Object obj) {
boundObj = obj;
}
|
public void setRelative(boolean r) {
isRel = r;
}
|
public String toString() {
return (isRelative() ? "" : "(not relative)") + getName() + ": " +
getClassName();
}
Generates the string representation of this name/class pair.
The string representation consists of the name and class name separated
by a colon (':').
The contents of this string is useful
for debugging and is not meant to be interpreted programmatically. |