Annotation Interface ExtractedValue


@Retention(RUNTIME) @Target(TYPE_USE) @Documented public @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

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The type of the value extracted by the ValueExtractor.
  • Element Details

    • type

      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:
      the type of the value extracted by the value extractor
      Default:
      void.class