@Documented @Retention(value=RUNTIME) @Target(value={METHOD,CONSTRUCTOR}) @InheritedAnnotation @Repeatable(value=EnsuresQualifier.List.class) public @interface EnsuresQualifier
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 | Required Element and Description |
---|---|
String[] |
expression
Returns the Java expressions for which the qualifier holds after successful method
termination.
|
Class<? extends Annotation> |
qualifier
Returns the qualifier that is guaranteed to hold on successful termination of the method.
|
public abstract String[] expression
public abstract Class<? extends Annotation> qualifier