Annotation Type Delegate


@Target({FIELD,METHOD}) @Retention(SOURCE) @Deprecated public @interface Delegate
Deprecated.
Use Delegate instead.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<?>[]
    Deprecated.
    Each method in any of the types listed here (include supertypes) will not be delegated.
    Class<?>[]
    Deprecated.
    Normally the type of the field is used as delegate type.
  • Element Details

    • types

      Class<?>[] types
      Deprecated.
      Normally the type of the field is used as delegate type. However, to choose a different type to delegate, you can list one (or more) types here. Note that types with type arguments can only be done as a field type. A solution for this is to create a private inner interface/class with the appropriate types extended, and possibly with all methods you'd like to delegate listed, and then supply that class here. The field does not actually have to implement the type you're delegating; the type listed here is used only to determine which delegate methods to generate. NB: All methods in Object, as well as canEqual(Object other) will never be delegated.
      Returns:
      For each method (not already in java.lang.Object) in these types, generate a delegate method.
      Default:
      {}
    • excludes

      Class<?>[] excludes
      Deprecated.
      Each method in any of the types listed here (include supertypes) will not be delegated. NB: All methods in Object, as well as canEqual(Object other) will never be delegated.
      Returns:
      For each method (not already in java.lang.Object) in these types, skip generating a delegate method (overrides types()).
      Default:
      {}