|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Documented @Retention(value=RUNTIME) @Target(value=METHOD) public @interface AssertNonNullIfTrue
Indicates that if the method returns true, then the value expressions are non-null.
For instance, if File.isDirectory()
is true, then File.list()
is non-null, and File.listFiles()
is non-null. You
can express this relationship as:
@AssertNonNullIfTrue({"list()","listFiles()"})
public boolean isDirectory() { ... }
NonNull
,
AssertNonNullIfFalse
,
NullnessChecker
Modifier and Type | Required Element and Description |
---|---|
String[] |
value
Java expression(s) that are non-null after the method returns true. |
Element Detail |
---|
public abstract String[] value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |