Package org.jboss.as.naming.deployment
Class JndiName
- java.lang.Object
-
- org.jboss.as.naming.deployment.JndiName
-
- All Implemented Interfaces:
Serializable,Comparable<JndiName>
public class JndiName extends Object implements Serializable, Comparable<JndiName>
Utility object used to easily manged the construction and management of JNDI names.- Author:
- John E. Bailey
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description JndiNameappend(String local)Create a new JNDI name by appending a new local entry name to this name.intcompareTo(JndiName other)booleanequals(Object o)StringgetAbsoluteName()Get the absolute JNDI name as a string.StringgetLocalName()Get the local JNDI entry name.JndiNamegetParent()Get the parent JNDI name.inthashCode()static JndiNameof(String name)Create a new instance of the JndiName by breaking the provided string format into a JndiName parts.StringtoString()
-
-
-
Method Detail
-
getLocalName
public String getLocalName()
Get the local JNDI entry name. Eg. java:comp/enc => enc- Returns:
- The local JNDI entry name
-
getParent
public JndiName getParent()
Get the parent JNDI name. Eg. java:comp/enc => java:comp- Returns:
- The parent JNDI name
-
getAbsoluteName
public String getAbsoluteName()
Get the absolute JNDI name as a string.- Returns:
- The absolute JNDI name as a string
-
append
public JndiName append(String local)
Create a new JNDI name by appending a new local entry name to this name.- Parameters:
local- The new local part to append- Returns:
- A new JNDI name
-
of
public static JndiName of(String name)
Create a new instance of the JndiName by breaking the provided string format into a JndiName parts.- Parameters:
name- The string representation of a JNDI name.- Returns:
- The JndiName representation
-
compareTo
public int compareTo(JndiName other)
- Specified by:
compareToin interfaceComparable<JndiName>
-
-