|
JBoss Modular Service Kernel API 1.0.0.GA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.msc.service.ServiceName
public final class ServiceName
Service name class.
Field Summary | |
---|---|
static ServiceName |
JBOSS
The root name "jboss". |
Method Summary | |
---|---|
ServiceName |
append(ServiceName serviceName)
Create a service name by appending name parts of the provided ServiceName using this as a parent. |
ServiceName |
append(String... parts)
Create a service name by appending name parts using this as a parent to the new ServiceName. |
ServiceName |
commonAncestorOf(ServiceName other)
Return the service name that is the nearest common ancestor of the this name and the given one. |
int |
compareTo(ServiceName o)
Compare two service names lexicographically. |
boolean |
equals(Object o)
Compare this service name to another service name. |
boolean |
equals(ServiceName o)
Compare this service name to another service name. |
String |
getCanonicalName()
Get the canonical name of this service name. |
ServiceName |
getParent()
Get the parent (enclosing) service name. |
String |
getSimpleName()
Get the simple (unqualified) name of this service. |
int |
hashCode()
Return the hash code of this service name. |
boolean |
isParentOf(ServiceName other)
Determine whether this service name is the same as, or a parent of, the given service name. |
static boolean |
isValidNameSegment(String part)
Indicates if the name segment is valid. |
int |
length()
Get the length (in segments) of this service name. |
static ServiceName |
of(ServiceName parent,
String... parts)
Create a ServiceName from a series of String parts and a parent service name. |
static ServiceName |
of(String... parts)
Create a ServiceName from a series of String parts. |
static ServiceName |
parse(String original)
Parse a string-form service name. |
String[] |
toArray()
Convert this service name into an array of strings containing the segments of the name. |
String |
toString()
Get a string representation of this service name. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final ServiceName JBOSS
Method Detail |
---|
public static ServiceName of(String... parts)
parts
- The string representations of the service name segments
public static ServiceName of(ServiceName parent, String... parts)
parent
- The parent ServiceName for this nameparts
- The string representations of the service name segments
public ServiceName append(String... parts)
parts
- The parts to append
public ServiceName append(ServiceName serviceName)
serviceName
- The service name to use as the parts to append
public int length()
public ServiceName getParent()
public String getSimpleName()
public boolean isParentOf(ServiceName other)
other
- the other name
true
if this service name is a parentpublic ServiceName commonAncestorOf(ServiceName other)
other
- the other name
null
if they are unrelatedpublic boolean equals(Object o)
equals
in class Object
o
- the other service name
true
if they are equal, false
if they are not equal or the argument is not a service name or is null
public boolean equals(ServiceName o)
o
- the other service name
true
if they are equal, false
if they are not equal or the argument is null
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public String getCanonicalName()
public static boolean isValidNameSegment(String part)
part
- a name segment
true
if part
is validpublic static ServiceName parse(String original) throws IllegalArgumentException
"
' characters), then
the section will be parsed as a quoted string with optional escaped characters. The set of valid escapes is
similar to what is supported by the JLS (§3.3 and §3.10.6), with one exception: the string \0
is always parsed as a NUL character
(0) and not as an octal escape sequence. Control characters are not allowed in any part of a name
and must be escaped in a quoted section if they are present in the service name string. Whitespace characters
are allowed only in a quoted section.
original
- the string form of a service name
ServiceName
instance
IllegalArgumentException
- if the original is not validpublic int compareTo(ServiceName o)
compareTo
in interface Comparable<ServiceName>
o
- the other name
public String[] toArray()
of(String...)
it will yield a ServiceName
which is equal to this one.
|
JBoss Modular Service Kernel API 1.0.0.GA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |