Methods Summary |
---|
public java.lang.String | getClassName()Retrieves the class name of the object bound to the name of this binding.
If a reference or some other indirect information is bound,
retrieves the class name of the eventual object that
will be returned by Binding.getObject().
return className;
|
public java.lang.String | getName()Retrieves the name of this binding.
If isRelative() is true, this name is relative to the
target context (which is named by the first parameter of the
list()).
If isRelative() is false, this name is a URL string.
return name;
|
public java.lang.String | getNameInNamespace()Retrieves the full name of this binding.
The full name is the absolute name of this binding within
its own namespace. See {@link Context#getNameInNamespace()}.
In naming systems for which the notion of full name does not
apply to this binding an UnsupportedOperationException
is thrown.
This exception is also thrown when a service provider written before
the introduction of the method is in use.
The string returned by this method is not a JNDI composite name and
should not be passed directly to context methods.
if (fullName == null) {
throw new UnsupportedOperationException();
}
return fullName;
|
public boolean | isRelative()Determines whether the name of this binding is
relative to the target context (which is named by
the first parameter of the list() method).
return isRel;
|
public void | setClassName(java.lang.String name)Sets the class name of this binding.
this.className = name;
|
public void | setName(java.lang.String name)Sets the name of this binding.
this.name = name;
|
public void | setNameInNamespace(java.lang.String fullName)Sets the full name of this binding.
This method must be called to set the full name whenever a
NameClassPair is created and a full name is
applicable to this binding.
Setting the full name to null, or not setting it at all, will
cause getNameInNamespace() to throw an exception.
this.fullName = fullName;
|
public void | setRelative(boolean r)Sets whether the name of this binding is relative to the target
context (which is named by the first parameter of the list()
method).
isRel = r;
|
public java.lang.String | toString()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.
return (isRelative() ? "" : "(not relative)") + getName() + ": " +
getClassName();
|