Annotation Type Delegate
-
Optional Element Summary
-
Element Details
-
types
Class<?>[] typesDeprecated.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 inObject
, as well ascanEqual(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<?>[] excludesDeprecated.Each method in any of the types listed here (include supertypes) will not be delegated. NB: All methods inObject
, as well ascanEqual(Object other)
will never be delegated.- Returns:
- For each method (not already in
java.lang.Object
) in these types, skip generating a delegate method (overridestypes()
).
- Default:
{}
-
Delegate
instead.