Package jakarta.validation.metadata
Enum ValidateUnwrappedValue
- java.lang.Object
-
- java.lang.Enum<ValidateUnwrappedValue>
-
- jakarta.validation.metadata.ValidateUnwrappedValue
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ValidateUnwrappedValue>
public enum ValidateUnwrappedValue extends java.lang.Enum<ValidateUnwrappedValue>
The unwrapping behavior that can be applied to a specific constraint.- Since:
- 2.0
- Author:
- Guillaume Smet
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DEFAULT
No specific unwrapping behavior has been defined for this constraint and the default behavior applies: if there is exactly one maximally-specific type-compliantValueExtractor
and this extractor is marked withUnwrapByDefault
, this extractor is applied and the constraint is applied to the value(s) wrapped by the annotated container.SKIP
The value is not unwrapped before validation, i.e.UNWRAP
The value is unwrapped before validation, i.e.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ValidateUnwrappedValue
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ValidateUnwrappedValue[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DEFAULT
public static final ValidateUnwrappedValue DEFAULT
No specific unwrapping behavior has been defined for this constraint and the default behavior applies: if there is exactly one maximally-specific type-compliantValueExtractor
and this extractor is marked withUnwrapByDefault
, this extractor is applied and the constraint is applied to the value(s) wrapped by the annotated container. Otherwise, no value extractor is applied.
-
UNWRAP
public static final ValidateUnwrappedValue UNWRAP
The value is unwrapped before validation, i.e. the constraint is applied to the value(s) wrapped by the annotated container.
-
SKIP
public static final ValidateUnwrappedValue SKIP
The value is not unwrapped before validation, i.e. the constraint is applied to the annotated element.
-
-
Method Detail
-
values
public static ValidateUnwrappedValue[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ValidateUnwrappedValue c : ValidateUnwrappedValue.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ValidateUnwrappedValue valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-