|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Target(value={CONSTRUCTOR,METHOD,TYPE,PACKAGE})
@Retention(value=RUNTIME)
public @interface ValidateOnExecutionExpresses which executables (methods or constructors) should have their parameters and return value validated upon execution. Can be on executable (method, constructor) or type level (with the former taking precedence).
If not present for a given executable, the default configuration fromMETA-INF/validation.xml and finally the implicit default
validated executable types (constructors and non-getters) are taken into account to determine
whether a given executable is validated upon execution or not.
The following describes the formal rules for deciding whether an executable is validated.
They are applied in decreasing order:
@ValidateOnExecution and
the type attribute contains the executable type or ExecutableType.IMPLICIT.
If the type attribute does neither contain the executable type nor IMPLICIT,
the executable is not validated.@ValidateOnExecution and the type attribute
contains the executable type. If the type attribute contains
IMPLICIT, then this rule is ignored and the behavior is
equivalent to ValidateOnExecution not being present. If the
type attribute does not contain the executable type, the executable is not
validated.ValidationException if the overriding / implementing method hosts
the ValidateOnExecution annotation.@ValidateOnExecution(NONE).
| Optional Element Summary | |
|---|---|
ExecutableType[] |
type
List of executable types to be validated when called. |
public abstract ExecutableType[] type
ExecutableType.IMPLICIT).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||