Annotation Type Delegate


@Documented @Target(METHOD) @Retention(RUNTIME) public @interface Delegate
Annotation applied to a method in an abstract class or interface to indicate that the method is an accessor for a property value. The method must take no parameters and return a non-void result type.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Property identifier used to initialize property.
  • Element Details

    • value

      String value
      Property identifier used to initialize property. Default empty string indicates that the name should be derived from the method name as follows:
      • If the method name is getName, the default id is name.
      • if the method name is isName, and the return type is boolean or Boolean, the default id is name.
      • Otherwise, the method name is the default id.
      Returns:
      the property id.
      Default:
      ""