public class PathImpl extends Object implements Path, Serializable
Path.BeanNode, Path.ConstructorNode, Path.CrossParameterNode, Path.MethodNode, Path.Node, Path.ParameterNode, Path.PropertyNode, Path.ReturnValueNode
Modifier and Type | Method and Description |
---|---|
void |
addNode(Path.Node node)
Add a node to this
PathImpl . |
void |
addProperty(String name)
Encapsulate the node manipulations needed to add a named property to this path.
|
static PathImpl |
copy(Path path)
Copy another Path.
|
static PathImpl |
create()
Create a
PathImpl instance representing the specified path. |
static PathImpl |
createPathFromString(String propertyPath)
Returns a
Path instance representing the path described by the given string. |
boolean |
equals(Object o) |
NodeImpl |
getLeafNode()
Get the leaf node (if any) from this
PathImpl |
PathImpl |
getPathWithoutLeafNode()
Return a new
PathImpl that represents this minus its leaf node (if present). |
int |
hashCode() |
boolean |
isRootPath()
Learn whether this
PathImpl points to the root of its graph. |
boolean |
isSubPathOf(Path path)
Learn whether
path is a parent to this . |
Iterator<Path.Node> |
iterator() |
Path.Node |
removeLeafNode()
Trim the leaf node from this
PathImpl . |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public static PathImpl createPathFromString(String propertyPath)
Path
instance representing the path described by the given string. To create a root node the
empty string should be passed. Note: This signature is to maintain pluggability with the RI impl.propertyPath
- the path as string representation.Path
instance representing the path described by the given string.public static PathImpl create()
PathImpl
instance representing the specified path.public static PathImpl copy(Path path)
path
- PathImpl
public boolean isRootPath()
PathImpl
points to the root of its graph.public PathImpl getPathWithoutLeafNode()
PathImpl
that represents this
minus its leaf node (if present).public void addProperty(String name)
name
- public Path.Node removeLeafNode()
PathImpl
.IllegalStateException
- if no nodes are foundpublic NodeImpl getLeafNode()
PathImpl
NodeImpl
public boolean isSubPathOf(Path path)
path
is a parent to this
.path
- true
if our nodes begin with nodes equal to those found in path
Copyright © 2010–2024 The Apache Software Foundation. All rights reserved.