@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 |
Class<? extends Annotation> |
qualifier |
public abstract String[] expression
public abstract Class<? extends Annotation> qualifier