Package dev.orne.test.rnd.params
Class PositiveConstraintExtractor
java.lang.Object
dev.orne.test.rnd.params.AbstractParametersSourceExtractor<NumberParameters,javax.validation.constraints.Positive>
dev.orne.test.rnd.params.PositiveConstraintExtractor
- All Implemented Interfaces:
ParametersSourceExtractor<NumberParameters,javax.validation.constraints.Positive>
@API(status=EXPERIMENTAL,
since="0.1")
public class PositiveConstraintExtractor
extends AbstractParametersSourceExtractor<NumberParameters,javax.validation.constraints.Positive>
Generation parameters extractor that detects
Positive
constraint annotations and sets NumParameters.min.
As long is a primitive type target's minimum value will
be the maximum of it's prior value and sources's value.
- Since:
- 0.1
- Version:
- 1.0, 2022-11
- Author:
- (w) Iker Hernaez
- See Also:
-
PositiveNumberParameters
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.orne.test.rnd.params.ParametersSourceExtractor
ParametersSourceExtractor.NopExtractor -
Field Summary
Fields inherited from interface dev.orne.test.rnd.params.ParametersSourceExtractor
NOP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidextractParameters(@NotNull javax.validation.constraints.Positive from, @NotNull NumberParameters target) Extracts the parameters from the specified source, modifying the generation parameters as required.Methods inherited from class dev.orne.test.rnd.params.AbstractParametersSourceExtractor
equals, getParametersType, getSourceType, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.orne.test.rnd.params.ParametersSourceExtractor
getPriority
-
Constructor Details
-
PositiveConstraintExtractor
public PositiveConstraintExtractor()Creates a new instance.
-
-
Method Details
-
extractParameters
public void extractParameters(@NotNull @NotNull javax.validation.constraints.Positive from, @NotNull @NotNull NumberParameters target) Extracts the parameters from the specified source, modifying the generation parameters as required.- Parameters:
from- The metadata sourcetarget- The target generation parameters
-