Class MaxConstraintExtractor

java.lang.Object
dev.orne.test.rnd.params.AbstractParametersSourceExtractor<NumberParameters,javax.validation.constraints.Max>
dev.orne.test.rnd.params.MaxConstraintExtractor
All Implemented Interfaces:
ParametersSourceExtractor<NumberParameters,javax.validation.constraints.Max>

@API(status=EXPERIMENTAL, since="0.1") public class MaxConstraintExtractor extends AbstractParametersSourceExtractor<NumberParameters,javax.validation.constraints.Max>
Generation parameters extractor that detects Max constraint annotations and sets NumParameters.max.

As long is a primitive type target's maximum value will be the minimum of it's prior value and sources's value.

Since:
0.1
Version:
1.0, 2022-11
Author:
(w) Iker Hernaez
See Also:
  • Constructor Details

    • MaxConstraintExtractor

      public MaxConstraintExtractor()
      Creates a new instance.
  • Method Details

    • extractParameters

      public void extractParameters(@NotNull @NotNull javax.validation.constraints.Max from, @NotNull @NotNull NumberParameters target)
      Extracts the parameters from the specified source, modifying the generation parameters as required.
      Parameters:
      from - The metadata source
      target - The target generation parameters