@Documented
@Target(value={METHOD,CONSTRUCTOR})
@Retention(value=RUNTIME)
public @interface Requires
When run time checking of contracts is enabled, preconditions
are checked at method entry and throw a
PreconditionError when they are violated.
| Modifier and Type | Required Element and Description |
|---|---|
java.lang.String[] |
value
The list of precondition expressions that must be met by the
annotated method, written as strings.
|
public abstract java.lang.String[] value
Expressions may also reference things that are not visible to the caller, such as private fields when the method is public, but this is considered bad style.