Class FieldProperty

All Implemented Interfaces:
Comparable<Property>

public class FieldProperty extends GenericProperty

A FieldProperty is a Property which is accessed as a field, without going through accessor methods (setX, getX). The field may have any scope (public, package, protected, private).

  • Constructor Details

    • FieldProperty

      public FieldProperty(Field field)
  • Method Details

    • set

      public void set(Object object, Object value) throws Exception
      Specified by:
      set in class Property
      Throws:
      Exception
    • get

      public Object get(Object object)
      Specified by:
      get in class Property
    • getAnnotations

      public List<Annotation> getAnnotations()
      Description copied from class: Property
      Returns the annotations that are present on this property or empty List if there're no annotations.
      Specified by:
      getAnnotations in class Property
      Returns:
      the annotations that are present on this property or empty List if there're no annotations
    • getAnnotation

      public <A extends Annotation> A getAnnotation(Class<A> annotationType)
      Description copied from class: Property
      Returns property's annotation for the given type or null if it's not present.
      Specified by:
      getAnnotation in class Property
      Type Parameters:
      A - class of the annotation
      Parameters:
      annotationType - the type of the annotation to be returned
      Returns:
      property's annotation for the given type or null if it's not present