|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectSimpleName
public class SimpleName
A GenericName backed by a JNDI Name instance. This name can be the basis
of LocalName or ScopedName implementations, depending on whether the
size of the wrapped JNDI name is 1 or more, respectively.
This implementation is a view: any change applied on the wrapped JNDI object
will be immediately reflected in the SimpleName wrapper. Note however that
GenericName are usually expected to be immutable, so users are advised to not
modify the wrapped JNDI name.
jndiName(),
Serialized Form| Nested Class Summary | |
|---|---|
static class |
SimpleName.Local
A LocalName specialization of SimpleName. |
static class |
SimpleName.Member
A MemberName specialization of SimpleName.Local. |
static class |
SimpleName.Scoped
A ScopedName specialization of SimpleName. |
static class |
SimpleName.Type
A TypeName specialization of SimpleName.Local. |
| Field Summary | |
|---|---|
protected Name |
name
The JNDI name wrapped by this SimpleName. |
| Constructor Summary | |
|---|---|
protected |
SimpleName(SimpleNameSpace scope,
Name name)
Creates a new instance backed by the given JNDI name. |
| Method Summary | |
|---|---|
int |
compareTo(GenericName other)
Compares this name with the given object for lexicographical order. |
int |
depth()
Returns the number of levels specified by this name. |
boolean |
equals(Object other)
Compares the given object to this name for equality. |
List<LocalName> |
getParsedNames()
Returns the sequence of local names making this generic name. |
int |
hashCode()
Returns a hash code value for this name. |
LocalName |
head()
Returns the first element in the sequence of parsed names. |
Name |
jndiName()
Returns a clone of the JNDI name wrapped by this object. |
ScopedName |
push(GenericName scope)
Returns this name expanded with the specified scope. |
NameSpace |
scope()
Returns the scope (name space) in which this name is local. |
LocalName |
tip()
Returns the last element in the sequence of parsed names. |
GenericName |
toFullyQualifiedName()
Returns a view of this name as a fully-qualified name. |
InternationalString |
toInternationalString()
Returns a local-dependent string representation of this generic name. |
String |
toString()
Returns a string representation of this generic name. |
| Methods inherited from class Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final Name name
SimpleName. While JNDI names are mutable,
GenericName are expected to be immutable. Consequently users are advised
to not modify this object.
jndiName()| Constructor Detail |
|---|
protected SimpleName(SimpleNameSpace scope,
Name name)
SimpleName construction.
scope - The scope (name space) in which the given name is local, or null.name - The JNDI name wrapped by this SimpleName (not cloned).| Method Detail |
|---|
public Name jndiName()
name.public NameSpace scope()
scope in interface GenericNamepublic int depth()
depth in interface GenericNameName.size()public List<LocalName> getParsedNames()
getParsedNames in interface GenericNameName.getAll()public LocalName head()
head in interface GenericNameName.get(int)public LocalName tip()
tip in interface GenericNameName.get(int)public GenericName toFullyQualifiedName()
this.
toFullyQualifiedName in interface GenericNamenull).public ScopedName push(GenericName scope)
scope with this.
push in interface GenericNamescope - The name to use as prefix.
Name.addAll(Name)public String toString()
toString in interface GenericNametoString in class Objectpublic InternationalString toInternationalString()
toString() value.
toInternationalString in interface GenericNamepublic int compareTo(GenericName other)
compareTo in interface Comparable<GenericName>other - The other object to compare to this name.public boolean equals(Object other)
equals in class Objectother - The other object to compare to this name.public int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||