Interface Property

All Known Implementing Classes:
AbstractProperty, FieldProperty, MethodProperty

public interface Property
Basic interface so we can wrap fields and methods so they look more or less the same. This makes @AlsoLoad methods look just like fields.
  • Method Summary

    Modifier and Type
    Method
    Description
    get(Object onPojo)
    Get the value of the property (field) if possible, or null if not possible (method)
    <A extends Annotation>
    A
    getAnnotation(Class<A> annoType)
    Get an annotation on this type, or null if there is no annotation of that type
    Enumerate the annotations
    Gets the index instruction for this property, if there is one.
    Get all the names associated with this property (ie, due to @AlsoLoad).
    Get the primary name associated with this property
    Get the real generic type of the field
    boolean
    isSaved(Object onPojo)
     
    void
    set(Object onPojo, Object value)
    Actually set the property (field or method) on an object
  • Method Details

    • getName

      String getName()
      Get the primary name associated with this property
    • getLoadNames

      String[] getLoadNames()
      Get all the names associated with this property (ie, due to @AlsoLoad). Includes the primary name unless it is @IgnoreLoad.
    • getAnnotation

      <A extends Annotation> A getAnnotation(Class<A> annoType)
      Get an annotation on this type, or null if there is no annotation of that type
    • getAnnotations

      Annotation[] getAnnotations()
      Enumerate the annotations
    • getType

      Type getType()
      Get the real generic type of the field
    • set

      void set(Object onPojo, Object value)
      Actually set the property (field or method) on an object
    • get

      Object get(Object onPojo)
      Get the value of the property (field) if possible, or null if not possible (method)
    • isSaved

      boolean isSaved(Object onPojo)
      Returns:
      true if this field should be saved, false if not
    • getIndexInstruction

      Boolean getIndexInstruction(Object onPojo)
      Gets the index instruction for this property, if there is one. Properties do not necessarily have a specific index or unindex instruction, and even if they do, the instruction might be conditional. Also factors in any index instruction on the class as a default. However, explicit index instruction on the field overrides the class.
      Returns:
      true if this field should be indexed, false if it should be unindexed, null is "no information, continue with defaults".