1 /*
2 * Jakarta Bean Validation API
3 *
4 * License: Apache License, Version 2.0
5 * See the license.txt file in the root directory or <http://www.apache.org/licenses/LICENSE-2.0>.
6 */
7 package javax.validation.metadata;
8
9 import javax.validation.valueextraction.UnwrapByDefault;
10 import javax.validation.valueextraction.ValueExtractor;
11
12 /**
13 * The unwrapping behavior that can be applied to a specific constraint.
14 *
15 * @author Guillaume Smet
16 * @since 2.0
17 */
18 public enum ValidateUnwrappedValue {
19
20 /**
21 * No specific unwrapping behavior has been defined for this constraint and the default
22 * behavior applies: if there is exactly one maximally-specific type-compliant
23 * {@link ValueExtractor} and this extractor is marked with {@link UnwrapByDefault}, this
24 * extractor is applied and the constraint is applied to the value(s) wrapped by the
25 * annotated container. Otherwise, no value extractor is applied.
26 */
27 DEFAULT,
28
29 /**
30 * The value is unwrapped before validation, i.e. the constraint is applied to the
31 * value(s) wrapped by the annotated container.
32 */
33 UNWRAP,
34
35 /**
36 * The value is not unwrapped before validation, i.e. the constraint is applied to the
37 * annotated element.
38 */
39 SKIP;
40 }
41