Class FieldMeta

java.lang.Object
io.ebean.enhance.entity.FieldMeta
All Implemented Interfaces:
Opcodes, EnhanceConstants

public class FieldMeta extends Object implements Opcodes, EnhanceConstants
Holds meta data for a field.

This can then generate the appropriate byte code for this field.

  • Constructor Details

    • FieldMeta

      public FieldMeta(ClassMeta classMeta, String name, String desc, String fieldClass)
      Construct based on field name and desc from reading byte code.

      Used for reading local fields (not inherited) via visiting the class bytes.

  • Method Details

    • setIndexPosition

      public void setIndexPosition(int indexPosition)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getFieldName

      public String getFieldName()
      Return the field name.
    • isPrimitiveType

      public boolean isPrimitiveType()
      Return true if this is a primitiveType.
    • getName

      public String getName()
      Return the field name.
    • isObjectArray

      public boolean isObjectArray()
      Return true if this field type is an Array of Objects.

      We can not support Object Arrays for field types.

    • isPersistent

      public boolean isPersistent()
      Return true is this is a persistent field.
    • isTransient

      public boolean isTransient()
      Return true if this is a transient field.
    • isId

      public boolean isId()
      Return true if this is an ID field.

      ID fields are used in generating equals() logic based on identity.

    • isToMany

      public boolean isToMany()
      Return true if this is a OneToMany or ManyToMany field.
    • isInitMany

      public boolean isInitMany()
      Control initialisation of ToMany and DbArray collection properties. This means these properties are lazy initialised on demand.
    • addGetSetMethods

      public void addGetSetMethods(ClassVisitor cv, ClassMeta classMeta)
      Add get and set methods for field access/interception.