Record Class ConstructorDefinition<K,C>
java.lang.Object
java.lang.Record
io.micronaut.context.beans.definition.ConstructorDefinition<K,C>
- Type Parameters:
K- The bean element kind typeC- The constructor representation type
- All Implemented Interfaces:
MemberDefinition<K>, AnnotationMetadataProvider, AnnotationSource
public record ConstructorDefinition<K,C> (C constructorElement, AnnotationMetadata annotationMetadata, List<BeanDefinitionInjectionPoint<K>> injectionPoints, boolean requiresReflection)
extends Record
implements MemberDefinition<K>
Describes a constructor used in a bean definition.
- Since:
- 5.1.0
- Author:
- Denis Stepanov
-
Field Summary
Fields inherited from interface AnnotationSource
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionConstructorDefinition(C constructorElement, AnnotationMetadata annotationMetadata, List<BeanDefinitionInjectionPoint<K>> injectionPoints, boolean requiresReflection) Creates an instance of aConstructorDefinitionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theannotationMetadatarecord component.Returns the value of theconstructorElementrecord component.final booleanIndicates whether some other object is "equal to" this one.default AnnotationMetadataReturns the annotation metadata associated with this element.final inthashCode()Returns a hash code value for this object.Returns the value of theinjectionPointsrecord 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
-
ConstructorDefinition
public ConstructorDefinition(C constructorElement, AnnotationMetadata annotationMetadata, List<BeanDefinitionInjectionPoint<K>> injectionPoints, boolean requiresReflection) Creates an instance of aConstructorDefinitionrecord class.- Parameters:
constructorElement- the value for theconstructorElementrecord componentannotationMetadata- the value for theannotationMetadatarecord componentinjectionPoints- the value for theinjectionPointsrecord componentrequiresReflection- the value for therequiresReflectionrecord component
-
-
Method Details
-
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. -
constructorElement
Returns the value of theconstructorElementrecord component.- Returns:
- the value of the
constructorElementrecord component
-
annotationMetadata
Returns the value of theannotationMetadatarecord component.- Returns:
- the value of the
annotationMetadatarecord component
-
injectionPoints
Returns the value of theinjectionPointsrecord component.- Specified by:
injectionPointsin interfaceMemberDefinition<K>- Returns:
- the value of the
injectionPointsrecord component
-
requiresReflection
public boolean requiresReflection()Returns the value of therequiresReflectionrecord component.- Returns:
- the value of the
requiresReflectionrecord component
-
getAnnotationMetadata
Returns the annotation metadata associated with this element.- Specified by:
getAnnotationMetadatain interfaceAnnotationMetadataProvider- Returns:
- The annotation metadata associated with this element
-