@Target({FIELD,METHOD})
@Retention(SOURCE)
public @interface Delegate
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.
Complete documentation is found at the project lombok features page for @Delegate.
java.lang.Class<?>[] types
Object, as well as canEqual(Object other) will never be delegated.java.lang.Object) in these types, generate a delegate method.java.lang.Class<?>[] excludes
Object, as well as canEqual(Object other) will never be delegated.java.lang.Object) in these types, skip generating a delegate method (overrides types()).Copyright © 2009-2018 The Project Lombok Authors, licensed under the MIT licence.