Annotation Interface FieldProxy


@Documented @Retention(RUNTIME) @Target(PARAMETER) public @interface FieldProxy
Using this annotation it is possible to access fields by getter and setter types. Before this annotation can be used, it needs to be installed with two types. The getter type must be defined in a single-method interface with a single method that returns an Object type and takes no arguments. The setter interface must similarly return void and take a single Object argument. After installing these interfaces with the FieldProxy.Binder, this binder needs to be registered with a MethodDelegation before it can be used.
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    A binder for the FieldProxy annotation.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Determines which type defines the field that is to be accessed.
    boolean
    Determines if the proxy should be serializable.
    Determines the name of the field that is to be accessed.
  • Element Details

    • serializableProxy

      boolean serializableProxy
      Determines if the proxy should be serializable.
      Returns:
      true if the proxy should be serializable.
      Default:
      false
    • value

      String value
      Determines the name of the field that is to be accessed. If this property is not set, a field name is inferred by the intercepted method after the Java beans naming conventions.
      Returns:
      The name of the field to be accessed.
      Default:
      ""
    • declaringType

      Class<?> declaringType
      Determines which type defines the field that is to be accessed. If this property is not set, the most field that is defined highest in the type hierarchy is accessed.
      Returns:
      The type that defines the accessed field.
      Default:
      void.class