javax.validation.executable
Annotation Type ValidateOnExecution


@Target(value={CONSTRUCTOR,METHOD,TYPE,PACKAGE})
@Retention(value=RUNTIME)
public @interface ValidateOnExecution

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).

Since:
1.1
Author:
Emmanuel Bernard

Optional Element Summary
 ExecutableType[] type
          List of executable types to be validated when called.
 

type

public abstract ExecutableType[] type
List of executable types to be validated when called. Defaults to the types discovered implicitly (see ExecutableType.IMPLICIT).

Default:
javax.validation.executable.ExecutableType.IMPLICIT


Copyright © 2007-2013 Red Hat Inc. All Rights Reserved. Released under the Apache Software License 2.0.