Package org.apache.bval.jsr.util
Class NodeImpl
- java.lang.Object
-
- org.apache.bval.jsr.util.NodeImpl
-
- All Implemented Interfaces:
jakarta.validation.Path.Node,Serializable
- Direct Known Subclasses:
NodeImpl.BeanNodeImpl,NodeImpl.ConstructorNodeImpl,NodeImpl.ContainerElementNodeImpl,NodeImpl.CrossParameterNodeImpl,NodeImpl.MethodNodeImpl,NodeImpl.ParameterNodeImpl,NodeImpl.PropertyNodeImpl,NodeImpl.ReturnValueNodeImpl
public abstract class NodeImpl extends Object implements jakarta.validation.Path.Node, Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNodeImpl.BeanNodeImplstatic classNodeImpl.ConstructorNodeImplstatic classNodeImpl.ContainerElementNodeImplstatic classNodeImpl.CrossParameterNodeImplstatic classNodeImpl.MethodNodeImplstatic classNodeImpl.ParameterNodeImplstatic classNodeImpl.PropertyNodeImplstatic classNodeImpl.ReturnValueNodeImpl
-
Field Summary
Fields Modifier and Type Field Description static Comparator<jakarta.validation.Path.Node>NODE_COMPARATORComparator for any pathPath.Node.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringBuilderappendNode(jakarta.validation.Path.Node node, StringBuilder to)Append a Node to the specified StringBuilder.<T extends jakarta.validation.Path.Node>
Tas(Class<T> nodeType)static NodeImplatIndex(Integer index)Get a NodeImpl indexed from the preceding node (or root).static NodeImplatKey(Object key)Get a NodeImpl keyed from the preceding node (or root).booleanequals(Object o)Class<?>getContainerClass()IntegergetIndex()ObjectgetKey()StringgetName()intgetParameterIndex()List<Class<?>>getParameterTypes()IntegergetTypeArgumentIndex()inthashCode()NodeImplinContainer(Class<?> containerType, Integer typeArgumentIndex)NodeImplinIterable()booleanisInIterable()voidsetIndex(Integer index)Set the index of this node, implyinginIterable.voidsetInIterable(boolean inIterable)voidsetKey(Object key)Set the map key of this node, implyinginIterable.voidsetName(String name)voidsetParameterIndex(Integer parameterIndex)voidsetParameterTypes(List<Class<?>> parameterTypes)StringtoString()
-
-
-
Field Detail
-
NODE_COMPARATOR
public static final Comparator<jakarta.validation.Path.Node> NODE_COMPARATOR
Comparator for any pathPath.Node. For iterable nodes with no, ornull, key and index values the left operand is always treated as less than the right.
-
-
Method Detail
-
appendNode
public static StringBuilder appendNode(jakarta.validation.Path.Node node, StringBuilder to)
Append a Node to the specified StringBuilder.- Parameters:
node-to-- Returns:
- to
-
atIndex
public static NodeImpl atIndex(Integer index)
Get a NodeImpl indexed from the preceding node (or root).- Parameters:
index-- Returns:
- NodeImpl
-
atKey
public static NodeImpl atKey(Object key)
Get a NodeImpl keyed from the preceding node (or root).- Parameters:
key-- Returns:
- NodeImpl
-
getName
public String getName()
- Specified by:
getNamein interfacejakarta.validation.Path.Node
-
setName
public void setName(String name)
- Parameters:
name- the name to set
-
isInIterable
public boolean isInIterable()
- Specified by:
isInIterablein interfacejakarta.validation.Path.Node
-
setInIterable
public void setInIterable(boolean inIterable)
- Parameters:
inIterable-
-
getIndex
public Integer getIndex()
- Specified by:
getIndexin interfacejakarta.validation.Path.Node
-
setIndex
public void setIndex(Integer index)
Set the index of this node, implyinginIterable.- Parameters:
index-
-
setParameterIndex
public void setParameterIndex(Integer parameterIndex)
-
getKey
public Object getKey()
- Specified by:
getKeyin interfacejakarta.validation.Path.Node
-
setKey
public void setKey(Object key)
Set the map key of this node, implyinginIterable.- Parameters:
key-
-
as
public <T extends jakarta.validation.Path.Node> T as(Class<T> nodeType)
- Specified by:
asin interfacejakarta.validation.Path.Node
-
toString
public String toString()
-
getParameterIndex
public int getParameterIndex()
-
getContainerClass
public Class<?> getContainerClass()
-
getTypeArgumentIndex
public Integer getTypeArgumentIndex()
-
inIterable
public NodeImpl inIterable()
-
-