public class ConfPath extends InstancePath
Class Representing an KeyPath path.
String representations e.g "/n:rootA/nodeB/listC{key1}/leafD"
User applications usually needs to construct string representations
of paths in this way. To construct a ConfPath from this
representation use ConfPath(String, Object...)
| Constructor and Description |
|---|
ConfPath(ConfEBinary o)
Initialize a ConfPath.
|
ConfPath(ConfEList o)
Initialize a ConfPath.
|
ConfPath(ConfObject[] kp)
Initializes a new instance of this class from a given
reverted ConfObject[] keypath where elements
is either
ConfTag or
ConfKey. |
ConfPath(String fmt,
Object... arguments)
Construct a
ConfPath from a string path representation
and of optional arguments. |
| Modifier and Type | Method and Description |
|---|---|
ConfPath |
append(String s)
Appends suffix path to existing keypath
|
Object |
clone()
Clones the ConfPath
|
ConfPath |
copyAppend(String s)
CopyAppends to the keypath
|
String |
toString()
Default String representation of this path, which is the keypath string
representation
|
String |
toXPathString()
Returns this path as an XPath string
|
public ConfPath(ConfEBinary o) throws ConfException
o - element constitute a ConfPathConfExceptionpublic ConfPath(ConfEList o)
o - element (reversed) constitute a ConfPathConfExceptionpublic ConfPath(ConfObject[] kp)
ConfTag or
ConfKey.kp - reverted keypathpublic ConfPath(String fmt, Object... arguments) throws ConfException
Construct a ConfPath from a string path representation
and of optional arguments.
The path is expressed as a format string that could contain fixed text with zero to many embedded format specifiers.
For each specifier one argument in the variable argument list is expected.
format specifiers in the Java API is:%d - requiring an integer parameter (type int) to be substituted.
%s - requiring a java.lang.String parameter to be substituted.
%x - requiring subclasses of type com.tailf.conf.ConfValue to be substituted.
fmt - path string representationarguments - optional parameters for substitution in fmtConfExceptionpublic ConfPath append(String s) throws ConfException
ConfExceptionpublic ConfPath copyAppend(String s) throws ConfException
ConfExceptionpublic String toString()
toString in class InstancePathpublic String toXPathString()
toXPathString in class InstancePath