Record Class MethodDefinition<K,M>
java.lang.Object
java.lang.Record
io.micronaut.context.beans.definition.MethodDefinition<K,M>
- Type Parameters:
K- The bean element kind typeM- The method representation type
- All Implemented Interfaces:
MemberDefinition<K>, AnnotationMetadataProvider, AnnotationSource
public record MethodDefinition<K,M> (M methodElement, AnnotationMetadata annotationMetadata, List<BeanDefinitionInjectionPoint<K>> injectionPoints, boolean requiresReflection, boolean isOptional, boolean isSetter, @Nullable BeanDefinitionInjectionPoint.PropertyInjectionPoint<K> booleanInjectionPoint)
extends Record
implements MemberDefinition<K>
Describes a method-related contribution to a bean definition.
- Since:
- 5.1.0
- Author:
- Denis Stepanov
-
Field Summary
Fields inherited from interface AnnotationSource
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionMethodDefinition(M methodElement, AnnotationMetadata annotationMetadata, List<BeanDefinitionInjectionPoint<K>> injectionPoints, boolean requiresReflection) Creates a method definition.MethodDefinition(M methodElement, AnnotationMetadata annotationMetadata, List<BeanDefinitionInjectionPoint<K>> injectionPoints, boolean requiresReflection, boolean isOptional, boolean isSetter, @Nullable BeanDefinitionInjectionPoint.PropertyInjectionPoint<K> booleanInjectionPoint) Creates an instance of aMethodDefinitionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theannotationMetadatarecord component.Returns the value of thebooleanInjectionPointrecord 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 theisOptionalrecord component.booleanisSetter()Returns the value of theisSetterrecord component.Returns the value of themethodElementrecord 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
-
MethodDefinition
public MethodDefinition(M methodElement, AnnotationMetadata annotationMetadata, List<BeanDefinitionInjectionPoint<K>> injectionPoints, boolean requiresReflection, boolean isOptional, boolean isSetter, @Nullable BeanDefinitionInjectionPoint.PropertyInjectionPoint<K> booleanInjectionPoint) Creates an instance of aMethodDefinitionrecord class.- Parameters:
methodElement- the value for themethodElementrecord componentannotationMetadata- the value for theannotationMetadatarecord componentinjectionPoints- the value for theinjectionPointsrecord componentrequiresReflection- the value for therequiresReflectionrecord componentisOptional- the value for theisOptionalrecord componentisSetter- the value for theisSetterrecord componentbooleanInjectionPoint- the value for thebooleanInjectionPointrecord component
-
MethodDefinition
public MethodDefinition(M methodElement, AnnotationMetadata annotationMetadata, List<BeanDefinitionInjectionPoint<K>> injectionPoints, boolean requiresReflection) Creates a method definition.- Parameters:
methodElement- The method elementannotationMetadata- The annotation metadatainjectionPoints- The injection pointsrequiresReflection- Whether reflective invocation is required
-
-
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. -
methodElement
Returns the value of themethodElementrecord component.- Returns:
- the value of the
methodElementrecord 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
-
isOptional
public boolean isOptional()Returns the value of theisOptionalrecord component.- Returns:
- the value of the
isOptionalrecord component
-
isSetter
public boolean isSetter()Returns the value of theisSetterrecord component.- Returns:
- the value of the
isSetterrecord component
-
booleanInjectionPoint
Returns the value of thebooleanInjectionPointrecord component.- Returns:
- the value of the
booleanInjectionPointrecord component
-
getAnnotationMetadata
Returns the annotation metadata associated with this element.- Specified by:
getAnnotationMetadatain interfaceAnnotationMetadataProvider- Returns:
- The annotation metadata associated with this element
-