@Documented @Retention(value=RUNTIME) @Target(value={METHOD,CONSTRUCTOR}) @InheritedAnnotation public @interface EnsuresQualifier
expression
and are
specified using a string. The qualifier is specified by qualifier
.
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 @EnsuresNonNull
and @EnsuresLockHeld
.EnsuresQualifiers
,
EnsuresQualifierIf
Modifier and Type | Required Element and Description |
---|---|
String[] |
expression
The Java expressions for which the qualifier holds after successful method termination.
|
Class<? extends Annotation> |
qualifier
The qualifier that is guaranteed to hold on successfull termination of the method.
|
public abstract String[] expression
public abstract Class<? extends Annotation> qualifier