public final class Name extends Object
null
parent Name) and a leaf name (never null
).
Consumers of that API are free to do their own Name rendering (they have access to the whole Name's chain
with getParent()
method) or use the pre-defined getFullyQualifiedName()
and getScopedName()
methods. Theses methods use the plus (+) character as separator.
The Name instances are immutable.
Modifier and Type | Method and Description |
---|---|
Name |
child(String name)
Creates a new Name, relative to this Name with the given leaf name.
|
Name |
decorated(String decorator)
Returns this name with the last segment adapted to include the decorator name.
|
boolean |
equals(Object o) |
String |
getFullyQualifiedName()
Returns a String representation of this Name that includes the full Name hierarchy.
|
String |
getLeaf()
Returns the leaf name (cannot be
null ). |
Name |
getParent()
Returns the parent Name (can be
null ). |
String |
getScopedName()
Returns a String representation of this Name that includes only the first parent and the leaf name.
|
int |
hashCode() |
static Name |
of(Class<?> type)
Builds a new Name for the given type.
|
static Name |
of(String... parts)
Builds a new Name using the given name parts.
|
String |
toString()
Returns the fully qualified name of this Name (format: (parent '+')* leaf).
|
public static Name of(String... parts)
parts
- ordered fragments of the namepublic static Name of(Class<?> type)
type
- typ used to generate a namepublic Name getParent()
null
).null
).public String getLeaf()
null
).public Name child(String name)
name
- relative leaf namepublic Name decorated(String decorator)
decorator
- decorator name.public String getFullyQualifiedName()
The following format has to be expected:
(parent '+')* leaf
Examples:
LocalNameOnly
/openig/config/config.json+_Router
/openig/config/config.json+_Router+/openig/config/routes/openid-connect.json+OAuth2Filter
public String getScopedName()
The following format has to be expected:
(parent '+')? leaf
Examples:
LocalNameOnly
/openig/config/config.json+_Router
public String toString()
toString
in class Object
getFullyQualifiedName()
Copyright © 2025 Open Identity Platform Community. All rights reserved.