Package dev.orne.test.rnd.params
Class AbstractParametersSourceExtractor<P,S>
java.lang.Object
dev.orne.test.rnd.params.AbstractParametersSourceExtractor<P,S>
- Type Parameters:
P- The generation parameters typeS- The metadata sources type
- All Implemented Interfaces:
ParametersSourceExtractor<P,S>
- Direct Known Subclasses:
KeyValueGenericParametersExtractor,KeyValueGenericParametersTypeExtractor,MaxConstraintExtractor,MinConstraintExtractor,NotNullConstraintExtractor,NullableParametersExtractor,NumberParametersExtractor,PositiveConstraintExtractor,PositiveOrZeroConstraintExtractor,SimpleGenericParametersExtractor,SimpleGenericParametersTypeExtractor,SizeConstraintExtractor,SizeParametersExtractor
@API(status=EXPERIMENTAL,
since="0.1")
public abstract class AbstractParametersSourceExtractor<P,S>
extends Object
implements ParametersSourceExtractor<P,S>
Abstract implementation of
ParametersSourceExtractor.- Since:
- 0.1
- Version:
- 1.0, 2022-11
- Author:
- (w) Iker Hernaez
-
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
ConstructorsModifierConstructorDescriptionprotectedCrates a new instance.protectedAbstractParametersSourceExtractor(@NotNull Class<P> parametersType, @NotNull Class<S> sourceType) Crates a new instance. -
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.orne.test.rnd.params.ParametersSourceExtractor
extractParameters, getPriority
-
Constructor Details
-
AbstractParametersSourceExtractor
protected AbstractParametersSourceExtractor(@NotNull @NotNull Class<P> parametersType, @NotNull @NotNull Class<S> sourceType) Crates a new instance.- Parameters:
parametersType- The target generation parameters typesourceType- The metadata sources type
-
AbstractParametersSourceExtractor
protected AbstractParametersSourceExtractor()Crates a new instance.Infers the target generation parameters and metadata sources types from the generic type arguments of this class. The class must extend this class specifying the generic types.
Example:
class MyExtractor extends AbstractParametersSourceExtractor<MyParams, MySource> { ... }
-
-
Method Details
-
getParametersType
Returns the target generation parameters type.- Specified by:
getParametersTypein interfaceParametersSourceExtractor<P,S> - Returns:
- The target generation parameters type
-
getSourceType
Returns the parameters source type.- Specified by:
getSourceTypein interfaceParametersSourceExtractor<P,S> - Returns:
- The parameters source type
-
hashCode
public int hashCode() -
equals
-
toString
-