Class NodeImpl

java.lang.Object
org.instancio.internal.nodes.NodeImpl
All Implemented Interfaces:
Node

public final class NodeImpl extends Object implements Node
  • Constructor Details

    • NodeImpl

      public NodeImpl(Class<?> targetClass, Field field)
  • Method Details

    • getTargetClass

      public Class<?> getTargetClass()
      Description copied from interface: Node
      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.
      Specified by:
      getTargetClass in interface Node
      Returns:
      target class of this node, never null
    • getField

      public Field getField()
      Description copied from interface: Node
      Returns the field of this node, if available.
      Specified by:
      getField in interface Node
      Returns:
      field of this node, or null if the node has no field
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object