Record Class FieldDefinition<K,F>
java.lang.Object
java.lang.Record
io.micronaut.context.beans.definition.FieldDefinition<K,F>
- Type Parameters:
K- The bean element kind typeF- The field representation type
- All Implemented Interfaces:
MemberDefinition<K>, AnnotationMetadataProvider, AnnotationSource
public record FieldDefinition<K,F> (F fieldElement, AnnotationMetadata annotationMetadata, BeanDefinitionInjectionPoint<K> injectionPoint, boolean requiresReflection, boolean isOptional)
extends Record
implements MemberDefinition<K>
Describes a field injection in a bean definition.
- Since:
- 5.1.0
- Author:
- Denis Stepanov
-
Field Summary
Fields inherited from interface AnnotationSource
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionFieldDefinition(F fieldElement, AnnotationMetadata annotationMetadata, BeanDefinitionInjectionPoint<K> injectionPoint, boolean requiresReflection, boolean isOptional) Creates an instance of aFieldDefinitionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theannotationMetadatarecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefieldElementrecord component.default AnnotationMetadataReturns the annotation metadata associated with this element.final inthashCode()Returns a hash code value for this object.Returns the value of theinjectionPointrecord component.Returns the injection points contributed by this member definition.booleanReturns the value of theisOptionalrecord component.booleanReturns the value of therequiresReflectionrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface AnnotationMetadataProvider
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getTargetAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByTypeMethods inherited from interface AnnotationSource
getAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeDeclared
-
Constructor Details
-
FieldDefinition
public FieldDefinition(F fieldElement, AnnotationMetadata annotationMetadata, BeanDefinitionInjectionPoint<K> injectionPoint, boolean requiresReflection, boolean isOptional) Creates an instance of aFieldDefinitionrecord class.- Parameters:
fieldElement- the value for thefieldElementrecord componentannotationMetadata- the value for theannotationMetadatarecord componentinjectionPoint- the value for theinjectionPointrecord componentrequiresReflection- the value for therequiresReflectionrecord componentisOptional- the value for theisOptionalrecord component
-
-
Method Details
-
injectionPoints
Description copied from interface:MemberDefinitionReturns the injection points contributed by this member definition.- Specified by:
injectionPointsin interfaceMemberDefinition<K>- Returns:
- The injection points contributed by this member definition
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
fieldElement
Returns the value of thefieldElementrecord component.- Returns:
- the value of the
fieldElementrecord component
-
annotationMetadata
Returns the value of theannotationMetadatarecord component.- Returns:
- the value of the
annotationMetadatarecord component
-
injectionPoint
Returns the value of theinjectionPointrecord component.- Returns:
- the value of the
injectionPointrecord component
-
requiresReflection
public boolean requiresReflection()Returns the value of therequiresReflectionrecord component.- Returns:
- the value of the
requiresReflectionrecord component
-
isOptional
public boolean isOptional()Returns the value of theisOptionalrecord component.- Returns:
- the value of the
isOptionalrecord component
-
getAnnotationMetadata
Returns the annotation metadata associated with this element.- Specified by:
getAnnotationMetadatain interfaceAnnotationMetadataProvider- Returns:
- The annotation metadata associated with this element
-