|
Lombok - v0.11.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||
@Target(value={FIELD,METHOD})
@Retention(value=SOURCE)
public @interface DelegatePut on any field to make lombok generate delegate methods that forward the call to this field. Example:
private @Delegate List<String> foo;
will generate for example an boolean add(String) method, which contains: return foo.add(arg);, as well as all other methods in List.
All public instance methods of the field's type, as well as all public instance methods of all the field's type's superfields are delegated, except for all methods
that exist in Object, the canEqual(Object) method, and any methods that appear in types
that are listed in the excludes property.
| Optional Element Summary | |
|---|---|
Class<?>[] |
excludes
Each method in any of the types listed here (include supertypes) will not be delegated. |
Class<?>[] |
types
Normally the type of the field is used as delegate type. |
public abstract Class<?>[] types
Object, as well as canEqual(Object other) will never be delegated.
public abstract Class<?>[] excludes
Object, as well as canEqual(Object other) will never be delegated.
|
Lombok - v0.11.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||