Annotation Type 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:
    MethodDelegation, TargetMethodAnnotationDrivenBinder
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.Class<?> declaringType
      Determines which type defines the field that is to be accessed.
      boolean serializableProxy
      Determines if the proxy should be serializable.
      java.lang.String value
      Determines the name of the field that is to be accessed.
    • Element Detail

      • serializableProxy

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

        java.lang.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

        java.lang.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