| java.lang.Object javax.naming.NameClassPair
All known Subclasses: javax.naming.Binding,
NameClassPair | public class NameClassPair implements Serializable(Code) | | NameClassPair associates a name in a naming service with a
specified class name and also with a relative flag. In JNDI,
NameClassPair is extended by javax.naming.Binding ;
Binding objects are used in javax.naming.Context
implementations.
A NameClassPair object is not thread-safe unless appropriate
synchronization is applied to any code manipulating these objects.
As this class implements the Serializable interface, it is
important that fields below are declared with the same names.
|
Constructor Summary | |
public | NameClassPair(String name, String className) Construct a NameClassPair from a name and a class. | public | NameClassPair(String name, String className, boolean relative) Construct a NameClassPair from a name, a class and a
relative flag. |
Method Summary | |
public String | getClassName() Returns the value of the class which may be null. | public String | getName() Returns the value of the name field which may be null. | public String | getNameInNamespace() Returns the value of the full name field which may be null. | public boolean | isRelative() Returns the value of the relative flag. | public void | setClassName(String className) Set the class of this object. | public void | setName(String name) Set the name of this object. | public void | setNameInNamespace(String fullName) Set the full name of this object. | public void | setRelative(boolean relative) Set the isRelative flag field of this object. | public String | toString() If the flag is set to false then the string is preceded with "(not
relative)" and then has the name value, ": " and the class value. |
NameClassPair | public NameClassPair(String name, String className)(Code) | | Construct a NameClassPair from a name and a class. Both
arguments can be null. Relative flag is true.
Parameters: name - a name used in naming service Parameters: className - a class name |
NameClassPair | public NameClassPair(String name, String className, boolean relative)(Code) | | Construct a NameClassPair from a name, a class and a
relative flag. The name and class arguments can be null.
Parameters: name - a name used in naming service Parameters: className - a class name Parameters: relative - a relative flag |
getClassName | public String getClassName()(Code) | | Returns the value of the class which may be null.
the value of the class which may be null. |
getName | public String getName()(Code) | | Returns the value of the name field which may be null.
the value of the name field which may be null. |
getNameInNamespace | public String getNameInNamespace()(Code) | | Returns the value of the full name field which may be null.
the value of the full name field which may be null. throws: UnsupportedOperationException - |
isRelative | public boolean isRelative()(Code) | | Returns the value of the relative flag.
the value of the relative flag. |
setClassName | public void setClassName(String className)(Code) | | Set the class of this object. The argument can be null.
Parameters: className - a class name |
setName | public void setName(String name)(Code) | | Set the name of this object. The argument can be null.
Parameters: name - a name used in naming service |
setNameInNamespace | public void setNameInNamespace(String fullName)(Code) | | Set the full name of this object. The argument can be null.
Parameters: fullName - a full name |
setRelative | public void setRelative(boolean relative)(Code) | | Set the isRelative flag field of this object.
Parameters: relative - a relative flag |
toString | public String toString()(Code) | | If the flag is set to false then the string is preceded with "(not
relative)" and then has the name value, ": " and the class value.
a string representation of this object |
|
|