public interface NameContext extends NameContextElement
A NameContext represents an interface for binding String names to Object "elements". The interface includes methods for putting, getting, removing and listing elements, as well as testing to see if an element is bound.
A NameContext also implements NameContextElement, meaning that it may itself be bound into another NameContext, and has a property "nameContext" containing the NameContext into which it has been bound. This allows NameResolvers to navigate through a hierarchy of NameContexts.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getElement(java.lang.String pName)
Returns the element bound to the specified name.
|
boolean |
isElementBound(java.lang.String pName)
Returns true if the name has an element bound to it, false if
not.
|
java.util.Enumeration |
listElementNames()
Returns the list of element names as an Enumeration
|
java.util.Enumeration |
listElements()
Returns the list of bound elements as an Enumeration
|
void |
putElement(java.lang.String pName,
java.lang.Object pElement)
Binds the specified element to the specified name.
|
void |
removeElement(java.lang.String pName)
Removes the binding for the specified name.
|
getName, getNameContext
nameContextElementBound, nameContextElementUnbound
static final java.lang.String CLASS_VERSION
java.lang.Object getElement(java.lang.String pName)
void putElement(java.lang.String pName, java.lang.Object pElement)
void removeElement(java.lang.String pName)
boolean isElementBound(java.lang.String pName)
java.util.Enumeration listElementNames()
java.util.Enumeration listElements()