Annotation Type QualifierArgument
-
@Documented @Retention(RUNTIME) @Target(METHOD) public @interface QualifierArgumentAn annotation to use on an element of a contract annotation to indicate that the element specifies the value of an argument of the qualifier. A contract annotation is an annotation declared with aPreconditionAnnotation,PostconditionAnnotation, orConditionalPostconditionAnnotationmeta-annotation. The meta-annotation specifies the qualifier taking the arguments.For example, the following code declares a postcondition annotation for the
MinLenqualifier, allowing to specify its value:
The@PostconditionAnnotation(qualifier = MinLen.class) @Target({ElementType.METHOD, ElementType.CONSTRUCTOR}) public @interface EnsuresMinLen { String[] value(); @QualifierArgument("value") int targetValue() default 0;valueelement holds the expressions to which the qualifier applies andtargetValueholds the value for thevalueargument ofMinLen.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.StringvalueSpecifies the name of the argument of the qualifier, that is passed the values held in the annotated element.
-