Class ClassField


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

      Fields 
      Modifier and Type Field Description
      protected int access
      Access flags for the field (public, protected etc).
      protected ClassEnhancer enhancer
      The parent enhancer.
      protected java.lang.String fieldName
      Name of the field.
      protected java.lang.Object initialValue
      Initial value for the field.
      protected java.lang.Object type
      Type for the field
    • Constructor Summary

      Constructors 
      Constructor Description
      ClassField​(ClassEnhancer enhancer, java.lang.String name, int access, java.lang.Object type)
      Constructor
      ClassField​(ClassEnhancer enhancer, java.lang.String name, int access, java.lang.Object type, java.lang.Object value)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)
      Indicates whether some other object is "equal to" this one.
      int getAccess()
      Accessor for the access
      java.lang.Object getInitialValue()
      Accessor for the value
      java.lang.String getName()
      Accessor for the field name
      java.lang.Object getType()
      Accessor for the type
      int hashCode()
      Return hash code of this instance.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • enhancer

        protected ClassEnhancer enhancer
        The parent enhancer.
      • fieldName

        protected java.lang.String fieldName
        Name of the field.
      • access

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

        protected java.lang.Object type
        Type for the field
      • initialValue

        protected java.lang.Object initialValue
        Initial value for the field.
    • Constructor Detail

      • ClassField

        public ClassField​(ClassEnhancer enhancer,
                          java.lang.String name,
                          int access,
                          java.lang.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,
                          java.lang.String name,
                          int access,
                          java.lang.Object type,
                          java.lang.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 Detail

      • getName

        public java.lang.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 java.lang.Object getType()
        Accessor for the type
        Returns:
        Type of the field
      • getInitialValue

        public java.lang.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 java.lang.Object
        Returns:
        hash code of this instance
      • equals

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