Node.
The path corresponds to the succession of nodes
in the order they are returned by the Iterator.
| Modifier and Type | Class and Description |
|---|---|
| public static interface | Path.BeanNode
Node representing a bean. |
| public static interface | Path.ConstructorNode
Node representing a constructor. |
| public static interface | Path.ContainerElementNode
Node representing an element in a generic container such as |
| public static interface | Path.CrossParameterNode
Node representing the element holding cross-parameter constraints of a method or constructor. |
| public static interface | Path.MethodNode
Node representing a method. |
| public static interface | Path.Node
Represents an element of a navigation path. |
| public static interface | Path.ParameterNode
Node representing a parameter of a method or constructor. |
| public static interface | Path.PropertyNode
Node representing a property. |
| public static interface | Path.ReturnValueNode
Node representing the return value of a method or constructor. |
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: a human-readable representation of this pathReturns a human-readable representation of this path. |
| toString | back to summary |
|---|---|
| public String toString() Returns a human-readable representation of this path.
Clients should not rely on any specific structure of the returned value. Instead they
should iterate through the path nodes and obtain any required information by calling
the methods on | |
| Modifier and Type | Method and Description |
|---|---|
| public Class | Returns: the type of the container the node is placed in, if contained in a container type such asOptional, List or Map,
null otherwise
|
| public Integer | Returns: the index of the type argument affected by the violated constraint, if contained in a generic container type such asOptional, List or
Map.
|
| getContainerClass | back to summary |
|---|---|
public Class
| |
| getTypeArgumentIndex | back to summary |
|---|---|
public Integer getTypeArgumentIndex()
| |
| getParameterTypes | back to summary |
|---|---|
| public List | |
Optional,
List or Map.
| getContainerClass | back to summary |
|---|---|
public Class
| |
| getTypeArgumentIndex | back to summary |
|---|---|
public Integer getTypeArgumentIndex()
| |
| getParameterTypes | back to summary |
|---|---|
| public List | |
| Modifier and Type | Method and Description |
|---|---|
| public < the type to narrow down to T extends Path. | |
| public Integer | Returns: the index the node is placed in if contained in an array, aList
or any other container supporting indexed access, null otherwise
|
| public Object | Returns: the key the node is placed in if contained in aMap or any
other container supporting keyed access, null otherwise
|
| public ElementKind | |
| public String | Returns: name of the element which the node representsReturns the name of the element which the node represents:
|
| public boolean | Returns: true if the node represents an object contained in
a multi-valued container such as Iterable or Map or an array,
false otherwise
|
| public String | Returns: a human-readable representation of this nodeReturns a human-readable representation of this node. |
| as | back to summary |
|---|---|
| public <T extends Path. Narrows the type of this node down to the given type. The appropriate
type should be checked before by calling
| |
| getIndex | back to summary |
|---|---|
public Integer getIndex()
| |
| getKey | back to summary |
|---|---|
public Object getKey()
| |
| getKind | back to summary |
|---|---|
| public ElementKind getKind() The kind of element represented by the node. The following relationship
between an
This is useful to narrow down the
switch(node.getKind() {
case METHOD:
name = node.getName();
params = node.as(MethodNode.class).getParameterTypes();
case PARAMETER:
index = node.as(ParameterNode.class).getParameterIndex();
[...]
}
| |
| getName | back to summary |
|---|---|
| public String getName() Returns the name of the element which the node represents:
| |
| isInIterable | back to summary |
|---|---|
public boolean isInIterable()
| |
| toString | back to summary |
|---|---|
| public String toString() Returns a human-readable representation of this node. Clients should not rely on any specific structure of the returned value. Instead they should obtain any required information by calling the methods on this interface and its sub-types. | |
| Modifier and Type | Method and Description |
|---|---|
| public int |
| getParameterIndex | back to summary |
|---|---|
public int getParameterIndex()
| |
| Modifier and Type | Method and Description |
|---|---|
| public Class | Returns: the type of the container the node is placed in, if contained in a container type such asOptional, List or Map,
null otherwise
|
| public Integer | Returns: the index of the type argument affected by the violated constraint, if contained in a generic container type such asOptional, List or
Map, null otherwise
|
| getContainerClass | back to summary |
|---|---|
public Class
| |
| getTypeArgumentIndex | back to summary |
|---|---|
public Integer getTypeArgumentIndex()
| |