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>, io.micronaut.core.annotation.AnnotationMetadataProvider, io.micronaut.core.annotation.AnnotationSource
public record ConstructorDefinition<K,C> (C constructorElement, io.micronaut.core.annotation.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
-
Field Summary
Fields inherited from interface io.micronaut.core.annotation.AnnotationSource
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionConstructorDefinition(C constructorElement, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, List<BeanDefinitionInjectionPoint<K>> injectionPoints, boolean requiresReflection) Creates an instance of aConstructorDefinitionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionio.micronaut.core.annotation.AnnotationMetadataReturns the value of theannotationMetadatarecord component.Returns the value of theconstructorElementrecord component.final booleanIndicates whether some other object is "equal to" this one.default io.micronaut.core.annotation.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 io.micronaut.core.annotation.AnnotationMetadataProvider
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getTargetAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByTypeMethods inherited from interface io.micronaut.core.annotation.AnnotationSource
getAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeDeclared
-
Constructor Details
-
ConstructorDefinition
public ConstructorDefinition(C constructorElement, io.micronaut.core.annotation.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
public io.micronaut.core.annotation.AnnotationMetadata 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
default io.micronaut.core.annotation.AnnotationMetadata getAnnotationMetadata()Returns the annotation metadata associated with this element.- Specified by:
getAnnotationMetadatain interfaceio.micronaut.core.annotation.AnnotationMetadataProvider- Returns:
- The annotation metadata associated with this element
-