All Implemented Interfaces:
A context consists of name-to-object bindings. The NameClassPair class represents the name and the class of the bound object. It consists of a name and a string representing the package-qualified class name.
Use subclassing for naming systems that generate contents of a name/class pair dynamically.
A NameClassPair instance is not synchronized against concurrent access by multiple threads. Threads that need to access a NameClassPair concurrently should synchronize amongst themselves and provide the necessary locking.
public NameClassPair(String name, String className)
public NameClassPair(String name, String className, boolean isRelative)
|Method from javax.naming.NameClassPair Summary:|
|getClassName, getName, getNameInNamespace, isRelative, setClassName, setName, setNameInNamespace, setRelative, toString|
|Methods from java.lang.Object:|
|clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait|
|Method from javax.naming.NameClassPair Detail:|
public String getClassName()
public String 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.
public boolean isRelative()
public void setClassName(String name)
public void setNameInNamespace(String fullName)
Setting the full name to null, or not setting it at all, will cause getNameInNamespace() to throw an exception.
public void setRelative(boolean r)
public String toString()