Annotation Type ExtractedValue
-
@Retention(RUNTIME) @Target(TYPE_USE) @Documented public @interface ExtractedValue
Marks the type parameter of a generic container type to which aValueExtractoris 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
- Author:
- Gunnar Morling, Guillaume Smet
- See Also:
ValueExtractor
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description Class<?>typeThe type of the value extracted by theValueExtractor.
-
-
-
Element Detail
-
type
Class<?> type
The 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
ExtractedValueis defined on the type parameter of a generic container type. AValueExtractorDefinitionExceptionwill be thrown in this case.- Returns:
- the type of the value extracted by the value extractor
- Default:
- void.class
-
-