expression and are
specified using a string. The qualifier is specified by the qualifier annotation element.
Here is an example use:
@EnsuresQualifier(expression = "p.f1", qualifier = Odd.class)
void oddF1_1() {
p.f1 = null;
}
Some type systems have specialized versions of this annotation, such as org.checkerframework.checker.nullness.qual.EnsuresNonNull and org.checkerframework.checker.lock.qual.EnsuresLockHeld.
EnsuresQualifierIf
| Modifier and Type | Class and Description |
|---|---|
| public static @interface | EnsuresQualifier.List
A wrapper annotation that makes the |
| Modifier and Type | Method and Description |
|---|---|
| public String[] | Returns: the Java expressions for which the qualifier holds after successful method terminationReturns the Java expressions for which the qualifier holds after successful method termination. |
| public Class | Returns: the qualifier that is guaranteed to hold on successful termination of the methodReturns the qualifier that is guaranteed to hold on successful termination of the method. |
| expression | back to summary |
|---|---|
| public String[] expression() Returns the Java expressions for which the qualifier holds after successful method termination.
| |
| qualifier | back to summary |
|---|---|
| public Class Returns the qualifier that is guaranteed to hold on successful termination of the method.
| |
EnsuresQualifier annotation repeatable.
Programmers generally do not need to write this. It is created by Java when a programmer
writes more than one EnsuresQualifier annotation at the same location.
| Modifier and Type | Method and Description |
|---|---|
| public EnsuresQualifier[] |
| value | back to summary |
|---|---|
| public EnsuresQualifier[] value() Return the repeatable annotations.
| |