| Constructor and Description |
|---|
Address()
Creates a
root() address. |
Address(String... addressParts)
Creates an address with the given parts.
|
| Modifier and Type | Method and Description |
|---|---|
Address |
add(Address address)
Appends the given address to this address.
|
Address |
add(String... addressParts)
Appends the given address parts to this address.
|
Address |
add(String type,
String name)
Adds a single level to this address.
|
Address |
clone() |
boolean |
equals(Object obj) |
static Address |
fromModelNode(org.jboss.dmr.ModelNode node)
Obtains the address from the given ModelNode which is assumed to be a property list that
contains all the address parts and only the address parts.
|
static Address |
fromModelNodeWrapper(org.jboss.dmr.ModelNode haystack,
String needle)
Obtains an address property list from the given ModelNode wrapper.
|
org.jboss.dmr.ModelNode |
getAddressNode()
Returns this address as a ModelNode.
|
int |
hashCode() |
boolean |
isRoot() |
static Address |
parse(String addressStr)
Parses a flat address string that has the syntax "/type1=name/type2=name/.../typeN=nameN".
|
static Address |
root()
Returns the root address which is denoted as the flat address string of "/".
|
String[] |
toAddressParts() |
String |
toAddressPathString()
Returns the address as a flattened string that is compatible with
the DMR CLI address paths.
|
String |
toString() |
public Address()
root() address.public Address(String... addressParts)
add(String...).addressParts - the type/name parts of an address.public static Address root()
public static Address parse(String addressStr)
addressStr - flat address stringpublic static Address fromModelNode(org.jboss.dmr.ModelNode node)
node - address nodepublic static Address fromModelNodeWrapper(org.jboss.dmr.ModelNode haystack, String needle)
haystack - the wrapper ModelNode that contains a property whose value is an address property list.needle - the name of the property in the given wrapper ModelNode whose value is the address property list.IllegalArgumentException - there is no address property list in the wrapper node with the given name.fromModelNode(ModelNode)public org.jboss.dmr.ModelNode getAddressNode()
public Address add(String... addressParts)
addressParts - new address parts to add to the address.public Address add(String type, String name)
type - the new address part's typename - the new address part's namepublic Address add(Address address)
address - new address to appen to this address.public boolean isRoot()
public String[] toAddressParts()
public String toAddressPathString()
Copyright © 2015 Red Hat, Inc.. All rights reserved.