checkers.nullness.quals
Annotation Type AssertNonNullIfFalse


@Documented
@Retention(value=RUNTIME)
@Target(value=METHOD)
public @interface AssertNonNullIfFalse

Indicates that if the method returns false, then the value expressions are non-null.

For instance, if AbstractCollection.isEmpty() is false, then PriorityQueue.peek() is nonnull. You can express this relationship as:

  @AssertNonNullIfFalse({"peek()"})
   public boolean isEmpty() { ... }
 

See Also:
NonNull, AssertNonNullIfTrue, NullnessChecker
See the Checker Framework manual:
Nullness Checker

Required Element Summary
Modifier and Type Required Element and Description
 String[] value
          Java expression(s) that are non-null after the method returns false.
 

Element Detail

value

public abstract String[] value
Java expression(s) that are non-null after the method returns false.

See Also:
Syntax of Java expressions