Record Class ValueExtractorDefinition<T>
java.lang.Object
java.lang.Record
io.micronaut.validation.validator.extractors.ValueExtractorDefinition<T>
- Type Parameters:
T
- The value type- Record Components:
containerType
- The container typevalueType
- The value typetypeArgumentIndex
- The type argumentunwrapByDefault
- Is unwrapped by defaultvalueExtractor
- The value extractor
public record ValueExtractorDefinition<T>(@NonNull Class<T> containerType, @NonNull Class<Object> valueType, @Nullable Integer typeArgumentIndex, boolean unwrapByDefault, jakarta.validation.valueextraction.ValueExtractor<T> valueExtractor)
extends Record
The value extractor definition.
- Author:
- Denis Stepanov
-
Constructor Summary
ConstructorDescriptionValueExtractorDefinition
(@NonNull Class<T> containerType, @NonNull Class<Object> valueType, @Nullable Integer typeArgumentIndex, boolean unwrapByDefault, jakarta.validation.valueextraction.ValueExtractor<T> valueExtractor) Creates an instance of aValueExtractorDefinition
record class.ValueExtractorDefinition
(@NotNull io.micronaut.core.type.Argument<jakarta.validation.valueextraction.ValueExtractor<T>> argument, @NotNull jakarta.validation.valueextraction.ValueExtractor<T> valueExtractor) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecontainerType
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.@Nullable Integer
Returns the value of thetypeArgumentIndex
record component.boolean
Returns the value of theunwrapByDefault
record component.jakarta.validation.valueextraction.ValueExtractor<T>
Returns the value of thevalueExtractor
record component.Returns the value of thevalueType
record component.
-
Constructor Details
-
ValueExtractorDefinition
-
ValueExtractorDefinition
public ValueExtractorDefinition(@NonNull @NonNull Class<T> containerType, @NonNull @NonNull Class<Object> valueType, @Nullable @Nullable Integer typeArgumentIndex, boolean unwrapByDefault, jakarta.validation.valueextraction.ValueExtractor<T> valueExtractor) Creates an instance of aValueExtractorDefinition
record class.- Parameters:
containerType
- the value for thecontainerType
record componentvalueType
- the value for thevalueType
record componenttypeArgumentIndex
- the value for thetypeArgumentIndex
record componentunwrapByDefault
- the value for theunwrapByDefault
record componentvalueExtractor
- the value for thevalueExtractor
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
containerType
Returns the value of thecontainerType
record component.- Returns:
- the value of the
containerType
record component
-
valueType
Returns the value of thevalueType
record component.- Returns:
- the value of the
valueType
record component
-
typeArgumentIndex
Returns the value of thetypeArgumentIndex
record component.- Returns:
- the value of the
typeArgumentIndex
record component
-
unwrapByDefault
public boolean unwrapByDefault()Returns the value of theunwrapByDefault
record component.- Returns:
- the value of the
unwrapByDefault
record component
-
valueExtractor
Returns the value of thevalueExtractor
record component.- Returns:
- the value of the
valueExtractor
record component
-