Record Class AnnotationMemberDef
java.lang.Object
java.lang.Record
io.micronaut.python.processing.visitor.AnnotationMemberDef
- Record Components:
name- The name of the annotation membermemberType- The member type of the annotationannotationMetadata- The annotation metadata for the memberdecorators- Decorators applied to the member
- All Implemented Interfaces:
AnnotationMetadataProvider, AnnotationSource, ElementDef
public record AnnotationMemberDef(String name, @Nullable ClassElement memberType, @Nullable AnnotationMetadata annotationMetadata, @Nullable List<DecoratorDef> decorators)
extends Record
implements ElementDef, AnnotationMetadataProvider
Represents a member of a Python annotation (decorator parameter).
This record implements ElementDef to provide annotation member information
for Micronaut's annotation processing system.
- Since:
- 5.2.0
- Author:
- Micronaut Team
-
Field Summary
Fields inherited from interface AnnotationSource
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionAnnotationMemberDef(String name, @Nullable ClassElement memberType, @Nullable AnnotationMetadata annotationMetadata) AnnotationMemberDef(String name, @Nullable ClassElement memberType, @Nullable AnnotationMetadata annotationMetadata, @Nullable List<DecoratorDef> decorators) Creates an instance of aAnnotationMemberDefrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theannotationMetadatarecord component.Returns the value of thedecoratorsrecord component.final booleanIndicates whether some other object is "equal to" this one.Supplies the metadata.final inthashCode()Returns a hash code value for this object.Returns the value of thememberTyperecord component.name()Returns the value of thenamerecord 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
-
AnnotationMemberDef
public AnnotationMemberDef(String name, @Nullable @Nullable ClassElement memberType, @Nullable @Nullable AnnotationMetadata annotationMetadata, @Nullable @Nullable List<DecoratorDef> decorators) Creates an instance of aAnnotationMemberDefrecord class.- Parameters:
name- the value for thenamerecord componentmemberType- the value for thememberTyperecord componentannotationMetadata- the value for theannotationMetadatarecord componentdecorators- the value for thedecoratorsrecord component
-
AnnotationMemberDef
public AnnotationMemberDef(String name, @Nullable @Nullable ClassElement memberType, @Nullable @Nullable AnnotationMetadata annotationMetadata)
-
-
Method Details
-
decorators
Returns the value of thedecoratorsrecord component.- Specified by:
decoratorsin interfaceElementDef- Returns:
- the value of the
decoratorsrecord component
-
getAnnotationMetadata
Description copied from interface:AnnotationMetadataProviderSupplies the metadata. Defaults toAnnotationMetadata.EMPTY_METADATA.- Specified by:
getAnnotationMetadatain interfaceAnnotationMetadataProvider- Returns:
- The
AnnotationMetadata
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
name
Returns the value of thenamerecord component.- Specified by:
namein interfaceElementDef- Returns:
- the value of the
namerecord component
-
memberType
Returns the value of thememberTyperecord component.- Returns:
- the value of the
memberTyperecord component
-
annotationMetadata
Returns the value of theannotationMetadatarecord component.- Returns:
- the value of the
annotationMetadatarecord component
-