Interface ParametersSourceExtractor<P,S>

Type Parameters:
P - The target generation parameters type
S - The parameters source type
All Known Implementing Classes:
AbstractParametersSourceExtractor, KeyValueGenericParametersExtractor, KeyValueGenericParametersTypeExtractor, MaxConstraintExtractor, MinConstraintExtractor, NotNullConstraintExtractor, NullableParametersExtractor, NumberParametersExtractor, ParametersSourceExtractor.NopExtractor, PositiveConstraintExtractor, PositiveOrZeroConstraintExtractor, SimpleGenericParametersExtractor, SimpleGenericParametersTypeExtractor, SizeConstraintExtractor, SizeParametersExtractor

@API(status=EXPERIMENTAL, since="0.1") public interface ParametersSourceExtractor<P,S>
Interface for generation parameters extractor from a source type.
Since:
0.1
Version:
1.0, 2022-11
Author:
(w) Iker Hernaez
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    Fallback implementation of ParametersSourceExtractor that does nothing.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Shared instance of fallback NOP extractor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    extractParameters(S from, P target)
    Extracts the parameters from the specified source, modifying the generation parameters as required.
    @NotNull Class<P>
    Returns the target generation parameters type.
    default int
    Returns the priority of this extractor.
    @NotNull Class<S>
    Returns the parameters source type.
  • Field Details

  • Method Details

    • getParametersType

      @NotNull @NotNull Class<P> getParametersType()
      Returns the target generation parameters type.
      Returns:
      The target generation parameters type
    • getSourceType

      @NotNull @NotNull Class<S> getSourceType()
      Returns the parameters source type.
      Returns:
      The parameters source type
    • extractParameters

      void extractParameters(@NotNull S from, @NotNull P target)
      Extracts the parameters from the specified source, modifying the generation parameters as required.
      Parameters:
      from - The metadata source
      target - The target generation parameters
    • getPriority

      default int getPriority()
      Returns the priority of this extractor.
      Returns:
      The priority of this extractor