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 class
NodeImpl.BeanNodeImpl
static class
NodeImpl.ConstructorNodeImpl
static class
NodeImpl.ContainerElementNodeImpl
static class
NodeImpl.CrossParameterNodeImpl
static class
NodeImpl.MethodNodeImpl
static class
NodeImpl.ParameterNodeImpl
static class
NodeImpl.PropertyNodeImpl
static class
NodeImpl.ReturnValueNodeImpl
-
Field Summary
Fields Modifier and Type Field Description static Comparator<jakarta.validation.Path.Node>
NODE_COMPARATOR
Comparator for any pathPath.Node
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringBuilder
appendNode(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 NodeImpl
atIndex(Integer index)
Get a NodeImpl indexed from the preceding node (or root).static NodeImpl
atKey(Object key)
Get a NodeImpl keyed from the preceding node (or root).boolean
equals(Object o)
Class<?>
getContainerClass()
Integer
getIndex()
Object
getKey()
String
getName()
int
getParameterIndex()
List<Class<?>>
getParameterTypes()
Integer
getTypeArgumentIndex()
int
hashCode()
NodeImpl
inContainer(Class<?> containerType, Integer typeArgumentIndex)
NodeImpl
inIterable()
boolean
isInIterable()
void
setIndex(Integer index)
Set the index of this node, implyinginIterable
.void
setInIterable(boolean inIterable)
void
setKey(Object key)
Set the map key of this node, implyinginIterable
.void
setName(String name)
void
setParameterIndex(Integer parameterIndex)
void
setParameterTypes(List<Class<?>> parameterTypes)
String
toString()
-
-
-
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:
getName
in interfacejakarta.validation.Path.Node
-
setName
public void setName(String name)
- Parameters:
name
- the name to set
-
isInIterable
public boolean isInIterable()
- Specified by:
isInIterable
in interfacejakarta.validation.Path.Node
-
setInIterable
public void setInIterable(boolean inIterable)
- Parameters:
inIterable
-
-
getIndex
public Integer getIndex()
- Specified by:
getIndex
in 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:
getKey
in 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:
as
in interfacejakarta.validation.Path.Node
-
toString
public String toString()
-
getParameterIndex
public int getParameterIndex()
-
getContainerClass
public Class<?> getContainerClass()
-
getTypeArgumentIndex
public Integer getTypeArgumentIndex()
-
inIterable
public NodeImpl inIterable()
-
-