Module jakarta.validation
Annotation Interface ExtractedValue
Marks the type parameter of a generic container type to which a
ValueExtractor
is
tied or specifies the type of the wrapped element(s) of non-generic container types.
Must be given exactly once for a value extractor type.
- Since:
- 2.0
- See Also:
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionClass
<?> The type of the value extracted by theValueExtractor
.
-
Element Details
-
type
Class<?> typeThe type of the value extracted by theValueExtractor
. If not set, the type will be automatically inferred from the type argument of the parameterized type.Used to define value extractors for non-generic wrapper types e.g.
OptionalInt
.May not be used when
ExtractedValue
is defined on the type parameter of a generic container type. AValueExtractorDefinitionException
will be thrown in this case.- Returns:
- the type of the value extracted by the value extractor
- Default:
void.class
-