Annotation Type EnsuresMinLenIf
@Documented
@Retention(RUNTIME)
@Target({METHOD,CONSTRUCTOR})
@ConditionalPostconditionAnnotation(qualifier=MinLen.class)
@InheritedAnnotation
@Repeatable(EnsuresMinLenIf.List.class)
public @interface EnsuresMinLenIf
Indicates that the value of the given expression is a sequence containing at least the given
number of elements, if the method returns the given result (either true or false).
When the annotated method returns result, then all the expressions in
expression are considered to be MinLen(targetValue).
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceA wrapper annotation that makes theEnsuresMinLenIfannotation repeatable. -
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionintReturns the minimum number of elements in the sequence.
-
Element Details
-
expression
-
result
boolean resultReturns the return value of the method under which the postcondition to hold.- Returns:
- the return value of the method under which the postcondition to hold
-
targetValue
Returns the minimum number of elements in the sequence.- Returns:
- the minimum number of elements in the sequence
- Default:
0
-