Top Description Methods
javax.validation.valueextraction

public @Interface ExtractedValue

extends Annotation
Annotations
@Retention:RUNTIME
@Target:TYPE_USE
@Documented
Imports
java.lang.annotation.Documented, .ElementType, .Retention, .RetentionPolicy, .Target, java.util.OptionalInt

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.

Authors
Gunnar Morling, Guillaume Smet
Since
2.0
See Also
ValueExtractor

Method Summary

Modifier and TypeMethod and Description
public Class<?>

Returns:

the type of the value extracted by the value extractor
type
()

The type of the value extracted by the ValueExtractor.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

typeback to summary
public Class<?> type()

The type of the value extracted by the ValueExtractor. 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. A ValueExtractorDefinitionException will be thrown in this case.

Returns:Class<?>

the type of the value extracted by the value extractor