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
ConstructorsConstructorDescriptionValueExtractorDefinition(@NonNull Class<T> containerType, @NonNull Class<Object> valueType, @Nullable Integer typeArgumentIndex, boolean unwrapByDefault, jakarta.validation.valueextraction.ValueExtractor<T> valueExtractor) Creates an instance of aValueExtractorDefinitionrecord 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 thecontainerTyperecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.@Nullable IntegerReturns the value of thetypeArgumentIndexrecord component.booleanReturns the value of theunwrapByDefaultrecord component.jakarta.validation.valueextraction.ValueExtractor<T>Returns the value of thevalueExtractorrecord component.Returns the value of thevalueTyperecord 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 aValueExtractorDefinitionrecord class.- Parameters:
containerType- the value for thecontainerTyperecord componentvalueType- the value for thevalueTyperecord componenttypeArgumentIndex- the value for thetypeArgumentIndexrecord componentunwrapByDefault- the value for theunwrapByDefaultrecord componentvalueExtractor- the value for thevalueExtractorrecord 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 thecontainerTyperecord component.- Returns:
- the value of the
containerTyperecord component
-
valueType
Returns the value of thevalueTyperecord component.- Returns:
- the value of the
valueTyperecord component
-
typeArgumentIndex
Returns the value of thetypeArgumentIndexrecord component.- Returns:
- the value of the
typeArgumentIndexrecord component
-
unwrapByDefault
public boolean unwrapByDefault()Returns the value of theunwrapByDefaultrecord component.- Returns:
- the value of the
unwrapByDefaultrecord component
-
valueExtractor
Returns the value of thevalueExtractorrecord component.- Returns:
- the value of the
valueExtractorrecord component
-