Package org.instancio
Interface Node
-
Method Summary
Modifier and TypeMethodDescriptiongetField()Returns the field of this node, if available.Returns the parent of this node, ornullif this node is the root.Returns the setter of this node, if available, and ifKeys.ASSIGNMENT_TYPEis set toAssignmentType.METHOD.Class<?> Returns the target class of this node.
-
Method Details
-
getTargetClass
Class<?> getTargetClass()Returns the target class of this node.If this node represents a field, generally the target class will be the same as
Field.getType(). However, there are cases where the target class may differ, for example:- when a subtype is specified, then the node's target class will represent the subtype.
- when the node represents a generic type, then the target class will represent the resolved type argument.
- Returns:
- target class of this node, never
null - Since:
- 2.11.0
-
getField
Field getField()Returns the field of this node, if available.- Returns:
- field of this node, or
nullif the node has no field - Since:
- 2.11.0
-
getParent
Node getParent()Returns the parent of this node, ornullif this node is the root.- Returns:
- parent of this node
- Since:
- 3.5.0
-
getSetter
Method getSetter()Returns the setter of this node, if available, and ifKeys.ASSIGNMENT_TYPEis set toAssignmentType.METHOD.- Returns:
- setter of this node, or
nullif the node has no setter - Since:
- 4.0.0
-