Top Description Methods
jakarta.validation.executable

public @Interface ValidateOnExecution

extends Annotation
Annotations
@Target:CONSTRUCTOR, METHOD, TYPE, PACKAGE
@Retention:RUNTIME
@Documented
Static Imports
java.lang.annotation.ElementType.CONSTRUCTOR, .ElementType.METHOD, .ElementType.PACKAGE, .ElementType.TYPE, .RetentionPolicy.RUNTIME

Expresses 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 from META-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:

Note that you can exclude an executable from validation by making sure the rules above do not match or by annotating the executable with @ValidateOnExecution(NONE).

Author
Emmanuel Bernard
Since
1.1

Method Summary

Modifier and TypeMethod and Description
public ExecutableType[]

Returns:

array of ExecutableTypes to be validated
type
()

List of executable types to be validated when called.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

typeback to summary
public ExecutableType[] type()

List of executable types to be validated when called. Defaults to the types discovered implicitly (see ExecutableType#IMPLICIT).

Returns:ExecutableType[]

array of ExecutableTypes to be validated