Class ClassField

java.lang.Object
org.datanucleus.enhancer.ClassField

public class ClassField extends Object
Representation of a field that an enhanced class requires.
  • Field Details

    • enhancer

      protected ClassEnhancer enhancer
      The parent enhancer.
    • fieldName

      protected String fieldName
      Name of the field.
    • access

      protected int access
      Access flags for the field (public, protected etc).
    • type

      protected Object type
      Type for the field
    • initialValue

      protected Object initialValue
      Initial value for the field.
  • Constructor Details

    • ClassField

      public ClassField(ClassEnhancer enhancer, String name, int access, Object type)
      Constructor
      Parameters:
      enhancer - Class Enhancer
      name - Name of the field
      access - Access for the field (PUBLIC, PROTECTED etc)
      type - Type of the field
    • ClassField

      public ClassField(ClassEnhancer enhancer, String name, int access, Object type, Object value)
      Constructor
      Parameters:
      enhancer - Class Enhancer
      name - Name of the field
      access - Access for the field (PUBLIC, PROTECTED etc)
      type - Type of the field
      value - Initial value
  • Method Details

    • getName

      public String getName()
      Accessor for the field name
      Returns:
      Name of the field
    • getAccess

      public int getAccess()
      Accessor for the access
      Returns:
      Access type for the field
    • getType

      public Object getType()
      Accessor for the type
      Returns:
      Type of the field
    • getInitialValue

      public Object getInitialValue()
      Accessor for the value
      Returns:
      Initial value of the field
    • hashCode

      public int hashCode()
      Return hash code of this instance.
      Overrides:
      hashCode in class Object
      Returns:
      hash code of this instance
    • equals

      public boolean equals(Object o)
      Indicates whether some other object is "equal to" this one.
      Overrides:
      equals in class Object
      Parameters:
      o - the reference object with which to compare.
      Returns:
      true if this object is the same as the obj argument; false otherwise.