|
Lombok - v0.10.8 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Target(value={FIELD,METHOD,PARAMETER,LOCAL_VARIABLE}) @Retention(value=CLASS) @Documented public @interface NonNull
Lombok is smart enough to translate any annotation named @NonNull
in any casing and
with any package name to the return type of generated getters and the parameter of generated setters and constructors,
as well as generate the appropriate null checks in the setter and constructor.
You can use this annotation for the purpose, though you can also use JSR305's annotation, findbugs's, pmd's, or IDEA's, or just
about anyone elses. As long as it is named @NonNull
.
WARNING: If the java community ever does decide on supporting a single @NonNull
annotation (for example via JSR305), then
this annotation will be deleted from the lombok package. If the need to update an import statement scares
you, you should use your own annotation named @NonNull
instead of this one.
|
Lombok - v0.10.8 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |