org.hibernate.validator.engine
Class PathImpl

java.lang.Object
  extended by org.hibernate.validator.engine.PathImpl
All Implemented Interfaces:
java.io.Serializable, java.lang.Iterable<javax.validation.Path.Node>, javax.validation.Path

public final class PathImpl
extends java.lang.Object
implements javax.validation.Path, java.io.Serializable

Author:
Hardy Ferentschik, Gunnar Morling, Kevin Pollet - SERLI - (kevin.pollet@serli.com)
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface javax.validation.Path
javax.validation.Path.Node
 
Field Summary
static java.lang.String PROPERTY_PATH_SEPARATOR
           
 
Method Summary
 NodeImpl addNode(java.lang.String nodeName)
           
 java.lang.String asString()
           
 void buildHashCode()
           
static PathImpl createCopy(PathImpl path)
           
static PathImpl createNewPath(java.lang.String name)
           
static PathImpl createPathForMethodParameter(java.lang.reflect.Method method, java.lang.String parameterName)
          Creates a path representing the specified method parameter.
static PathImpl createPathForMethodReturnValue(java.lang.reflect.Method method)
           
static PathImpl createPathFromString(java.lang.String propertyPath)
          Returns a Path instance representing the path described by the given string.
static PathImpl createRootPath()
           
 boolean equals(java.lang.Object o)
           
 NodeImpl getLeafNode()
           
 PathImpl getPathWithoutLeafNode()
           
 int hashCode()
           
 boolean isRootPath()
           
 java.util.Iterator<javax.validation.Path.Node> iterator()
           
 NodeImpl makeLeafNodeIterable()
           
 NodeImpl setLeafNodeIndex(java.lang.Integer index)
           
 NodeImpl setLeafNodeMapKey(java.lang.Object key)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

PROPERTY_PATH_SEPARATOR

public static final java.lang.String PROPERTY_PATH_SEPARATOR
See Also:
Constant Field Values
Method Detail

createPathFromString

public static PathImpl createPathFromString(java.lang.String propertyPath)
Returns a Path instance representing the path described by the given string. To create a root node the empty string should be passed.

Parameters:
propertyPath - the path as string representation.
Returns:
a Path instance representing the path described by the given string.
Throws:
java.lang.IllegalArgumentException - in case property == null or property cannot be parsed.

createPathForMethodParameter

public static PathImpl createPathForMethodParameter(java.lang.reflect.Method method,
                                                    java.lang.String parameterName)
Creates a path representing the specified method parameter.

Parameters:
method - The method hosting the parameter to represent.
parameterName - The parameter's name, e.g. "arg0" or "param1".
Returns:
A path representing the specified method parameter.

createPathForMethodReturnValue

public static PathImpl createPathForMethodReturnValue(java.lang.reflect.Method method)

createNewPath

public static PathImpl createNewPath(java.lang.String name)

createRootPath

public static PathImpl createRootPath()

createCopy

public static PathImpl createCopy(PathImpl path)

isRootPath

public final boolean isRootPath()

getPathWithoutLeafNode

public final PathImpl getPathWithoutLeafNode()

addNode

public final NodeImpl addNode(java.lang.String nodeName)

makeLeafNodeIterable

public final NodeImpl makeLeafNodeIterable()

setLeafNodeIndex

public final NodeImpl setLeafNodeIndex(java.lang.Integer index)

setLeafNodeMapKey

public final NodeImpl setLeafNodeMapKey(java.lang.Object key)

getLeafNode

public final NodeImpl getLeafNode()

iterator

public final java.util.Iterator<javax.validation.Path.Node> iterator()
Specified by:
iterator in interface java.lang.Iterable<javax.validation.Path.Node>

asString

public final java.lang.String asString()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

buildHashCode

public void buildHashCode()


Copyright © 2011 Oracle Corporation. All Rights Reserved.