public class PathImpl extends Object implements javax.validation.Path, Serializable
javax.validation.Path.BeanNode, javax.validation.Path.ConstructorNode, javax.validation.Path.CrossParameterNode, javax.validation.Path.MethodNode, javax.validation.Path.Node, javax.validation.Path.ParameterNode, javax.validation.Path.PropertyNode, javax.validation.Path.ReturnValueNode
Modifier and Type | Method and Description |
---|---|
void |
addNode(javax.validation.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(javax.validation.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(javax.validation.Path path)
Learn whether
path is a parent to this . |
Iterator<javax.validation.Path.Node> |
iterator() |
javax.validation.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(javax.validation.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 addNode(javax.validation.Path.Node node)
PathImpl
.node
- to addpublic void addProperty(String name)
name
- public javax.validation.Path.Node removeLeafNode()
PathImpl
.IllegalStateException
- if no nodes are foundpublic NodeImpl getLeafNode()
PathImpl
NodeImpl
public Iterator<javax.validation.Path.Node> iterator()
public boolean isSubPathOf(javax.validation.Path path)
path
is a parent to this
.path
- true
if our nodes begin with nodes equal to those found in path
Copyright © 2010–2016 The Apache Software Foundation. All rights reserved.