|
Lombok - v0.10.0-RC3 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||
@Target(value={FIELD,TYPE})
@Retention(value=SOURCE)
public @interface GetterPut on any field to make lombok build a standard getter. Example:
private @Getter int foo;
will generate:
public int getFoo() {
return this.foo;
}
Note that fields of type boolean (but not java.lang.Boolean) will result in an
isFoo name instead of getFoo.
If any method named getFoo/isFoo exists, regardless of return type or parameters, no method is generated,
and instead a compiler warning is emitted.
This annotation can also be applied to a class, in which case it'll be as if all non-static fields that don't already have
a @Getter annotation have the annotation.
| Optional Element Summary | |
|---|---|
boolean |
lazy
|
Getter.AnyAnnotation[] |
onMethod
If you want your getter method to have additional annotations, you can specify them here. If the @Getter is put on a type, onMethod may not be specified. |
AccessLevel |
value
If you want your setter to be non-public, you can specify an alternate access level here. |
public abstract AccessLevel value
public abstract Getter.AnyAnnotation[] onMethod
@Getter is put on a type, onMethod may not be specified.
public abstract boolean lazy
|
Lombok - v0.10.0-RC3 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||