org.hibernate.validator.internal.engine.path
Class NodeImpl

java.lang.Object
  extended by org.hibernate.validator.internal.engine.path.NodeImpl
All Implemented Interfaces:
Serializable, Path.BeanNode, Path.ConstructorNode, Path.CrossParameterNode, Path.MethodNode, Path.Node, Path.ParameterNode, Path.PropertyNode, Path.ReturnValueNode

public class NodeImpl
extends Object
implements Path.PropertyNode, Path.MethodNode, Path.ConstructorNode, Path.BeanNode, Path.ParameterNode, Path.ReturnValueNode, Path.CrossParameterNode, Serializable

Immutable implementation of a Path.Node.

Author:
Hardy Ferentschik, Gunnar Morling
See Also:
Serialized Form

Field Summary
static String INDEX_CLOSE
           
static String INDEX_OPEN
           
 
Method Summary
<T extends Path.Node>
T
as(Class<T> nodeType)
           
 String asString()
           
 int buildHashCode()
           
static NodeImpl createBeanNode(NodeImpl parent)
           
static NodeImpl createConstructorNode(String name, NodeImpl parent, List<Class<?>> parameterTypes)
           
static NodeImpl createCrossParameterNode(NodeImpl parent)
           
static NodeImpl createMethodNode(String name, NodeImpl parent, List<Class<?>> parameterTypes)
           
static NodeImpl createParameterNode(String name, NodeImpl parent, int parameterIndex)
           
static NodeImpl createPropertyNode(String name, NodeImpl parent)
           
static NodeImpl createReturnValue(NodeImpl parent)
           
 boolean equals(Object obj)
           
 Integer getIndex()
           
 Object getKey()
           
 ElementKind getKind()
           
 String getName()
           
 int getParameterIndex()
           
 List<Class<?>> getParameterTypes()
           
 NodeImpl getParent()
           
 int hashCode()
           
 boolean isInIterable()
           
 boolean isIterable()
           
static NodeImpl makeIterable(NodeImpl node)
           
static NodeImpl setIndex(NodeImpl node, Integer index)
           
static NodeImpl setMapKey(NodeImpl node, Object key)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

INDEX_OPEN

public static final String INDEX_OPEN
See Also:
Constant Field Values

INDEX_CLOSE

public static final String INDEX_CLOSE
See Also:
Constant Field Values
Method Detail

createPropertyNode

public static NodeImpl createPropertyNode(String name,
                                          NodeImpl parent)

createParameterNode

public static NodeImpl createParameterNode(String name,
                                           NodeImpl parent,
                                           int parameterIndex)

createCrossParameterNode

public static NodeImpl createCrossParameterNode(NodeImpl parent)

createMethodNode

public static NodeImpl createMethodNode(String name,
                                        NodeImpl parent,
                                        List<Class<?>> parameterTypes)

createConstructorNode

public static NodeImpl createConstructorNode(String name,
                                             NodeImpl parent,
                                             List<Class<?>> parameterTypes)

createBeanNode

public static NodeImpl createBeanNode(NodeImpl parent)

createReturnValue

public static NodeImpl createReturnValue(NodeImpl parent)

makeIterable

public static NodeImpl makeIterable(NodeImpl node)

setIndex

public static NodeImpl setIndex(NodeImpl node,
                                Integer index)

setMapKey

public static NodeImpl setMapKey(NodeImpl node,
                                 Object key)

getName

public final String getName()
Specified by:
getName in interface Path.Node

isInIterable

public final boolean isInIterable()
Specified by:
isInIterable in interface Path.Node

isIterable

public final boolean isIterable()

getIndex

public final Integer getIndex()
Specified by:
getIndex in interface Path.Node

getKey

public final Object getKey()
Specified by:
getKey in interface Path.Node

getParent

public final NodeImpl getParent()

getKind

public ElementKind getKind()
Specified by:
getKind in interface Path.Node

as

public <T extends Path.Node> T as(Class<T> nodeType)
Specified by:
as in interface Path.Node

getParameterTypes

public List<Class<?>> getParameterTypes()
Specified by:
getParameterTypes in interface Path.ConstructorNode
Specified by:
getParameterTypes in interface Path.MethodNode

getParameterIndex

public int getParameterIndex()
Specified by:
getParameterIndex in interface Path.ParameterNode

toString

public String toString()
Overrides:
toString in class Object

asString

public final String asString()

buildHashCode

public int buildHashCode()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2007-2013 Red Hat Middleware, LLC. All Rights Reserved