Class PythonAnnotationElement
java.lang.Object
io.micronaut.inject.ast.annotation.AbstractAnnotationElement
io.micronaut.python.processing.element.AbstractPythonClassElement
io.micronaut.python.processing.element.PythonClassElement
io.micronaut.python.processing.element.PythonAnnotationElement
- All Implemented Interfaces:
ElementProvider, AnnotatedElement, AnnotationMetadata, AnnotationMetadataDelegate, AnnotationMetadataProvider, AnnotationSource, Described, Named, MutableAnnotationMetadataDelegate<Element>, AnnotationElement, ArrayableClassElement, ClassElement, Element, TypedElement
Class element implementation for Python annotations, which are declared as decorators.
- Since:
- 5.2.0
- Author:
- Denis Stepanov
-
Field Summary
Fields inherited from class AbstractPythonClassElement
arrayDimensions, environment, PYTHON_DEFAULT_PACKAGE, typeAnnotationsKeyFields inherited from class AbstractAnnotationElement
elementAnnotationMetadataFactory, presetAnnotationMetadataFields inherited from interface AnnotationMetadata
CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBERFields inherited from interface AnnotationSource
EMPTYFields inherited from interface ClassElement
ZERO_CLASS_ELEMENTSFields inherited from interface Element
EMPTY_ELEMENT_ARRAYFields inherited from interface MutableAnnotationMetadataDelegate
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionPythonAnnotationElement(ClassDef classDef, PythonProcessingEnvironment environment) -
Method Summary
Modifier and TypeMethodDescriptionprotected PythonClassElementcopyThis()booleanPython has no access modifiers, so the modifiers are derived from the visibility, static, abstract and final predicates of the element: an element is public unless its name marks it private, which keeps the modifier set consistent withElement.isPublic(),Element.isStatic(),Element.isAbstract()andElement.isFinal()for the callers that filter on modifiers, such asElementQuery.modifiers(...)andBeanElementBuilder.produceBeans(...).getName()inthashCode()booleanIs the annotation annotated withInherited?booleanbooleanisPublic()protected final io.micronaut.python.processing.element.AbstractPythonElementmakeCopy()Methods inherited from class PythonClassElement
addAssociatedBean, copyValues, createWithArrayDimensions, getAllTypeArguments, getCanonicalName, getDeclaredGenericPlaceholders, getDefaultConstructor, getEnclosingType, getInterfaces, getPrimaryConstructor, getSuperType, getType, getTypeArguments, initializeClassMetadata, isAssignable, isCallableWithoutArguments, isDataclass, isInner, isInterface, isIntroductionInterface, isIntroductionInterface, isMemberOfEnclosingType, isPythonSource, isStatic, registered, toString, withTypeArgumentsMethods inherited from class AbstractPythonClassElement
element, excludeIntrospectedProperties, findPythonClass, getAnnotationMetadata, getAnnotationMetadataToWrite, getArrayDimensions, getBeanProperties, getBeanProperties, getDocumentation, getEnclosedElements, getFields, getNativeType, getPackageName, getSyntheticBeanProperties, getTypeAnnotationMetadata, getTypeAnnotationsKey, isAbstract, isArray, withAnnotationMetadata, withArrayDimensionsMethods inherited from class AbstractAnnotationElement
annotate, annotate, annotate, annotate, annotate, getElementAnnotationMetadata, getElementAnnotationMetadataFactory, removeAnnotation, removeAnnotation, removeAnnotationIf, removeStereotype, removeStereotypeMethods inherited from interface AnnotatedElement
isDeclaredNonNull, isDeclaredNullable, isNonNull, isNullableMethods inherited from interface AnnotationMetadata
enumValuesSet, enumValuesSet, getValues, hasDeclaredStereotype, hasStereotypeNonRepeating, isAnnotationPresent, isDeclaredAnnotationPresentMethods inherited from interface AnnotationMetadataDelegate
booleanValue, booleanValue, booleanValue, booleanValue, classValue, classValue, classValue, classValue, classValues, classValues, classValues, classValues, copyAnnotationMetadata, doubleValue, doubleValue, doubleValue, enumValue, enumValue, enumValue, enumValue, enumValues, enumValues, enumValues, enumValues, findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, findRepeatableAnnotation, findRepeatableAnnotation, getAnnotation, getAnnotation, getAnnotationNameByStereotype, getAnnotationNameByStereotype, getAnnotationNames, getAnnotationNamesByStereotype, getAnnotationNamesByStereotype, getAnnotationType, getAnnotationType, getAnnotationTypeByStereotype, getAnnotationTypeByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationValuesByName, getAnnotationValuesByStereotype, getAnnotationValuesByType, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationValuesByName, getDeclaredAnnotationValuesByType, getDeclaredMetadata, getDeclaredStereotypeAnnotationNames, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValues, getStereotypeAnnotationNames, getTargetAnnotationMetadata, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValues, getValues, hasAnnotation, hasAnnotation, hasDeclaredAnnotation, hasDeclaredAnnotation, hasDeclaredStereotype, hasDeclaredStereotype, hasDeclaredStereotype, hasEvaluatedExpressions, hasPropertyExpressions, hasSimpleAnnotation, hasSimpleDeclaredAnnotation, hasStereotype, hasStereotype, hasStereotype, hasStereotype, intValue, intValue, intValue, isAnnotationPresent, isDeclaredAnnotationPresent, isEmpty, isFalse, isFalse, isPresent, isPresent, isRepeatableAnnotation, isRepeatableAnnotation, isTrue, isTrue, longValue, longValue, stringValue, stringValue, stringValue, stringValue, stringValues, stringValues, stringValues, stringValues, synthesize, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByTypeMethods inherited from interface AnnotationMetadataProvider
getAnnotationMetadataMethods inherited from interface ArrayableClassElement
fromArray, toArrayMethods inherited from interface ClassElement
addAssociatedBean, findDefaultStaticCreator, findField, findMethod, findStaticCreator, foldBoundGenericTypes, getAccessibleConstructors, getAccessibleStaticCreators, getAllTypeArguments, getBeanProperties, getBeanProperties, getBoundGenericTypes, getCanonicalName, getDeclaredGenericPlaceholders, getDefaultConstructor, getEnclosedElement, getEnclosedElements, getEnclosingType, getFields, getFirstTypeArgument, getInterfaces, getMethods, getOptionalValueType, getPackage, getPackageName, getPermittedSubclasses, getPrimaryConstructor, getRawClassElement, getSimpleName, getSuperType, getSyntheticBeanProperties, getType, getTypeAnnotationMetadata, getTypeArguments, getTypeArguments, getTypeArguments, hasUnresolvedTypes, isAssignable, isAssignable, isAssignable, isContainerType, isEnum, isGenericPlaceholder, isInner, isInterface, isIterable, isOptional, isProxy, isRawType, isRecord, isSealed, isTypeVariable, isWildcard, withAnnotationMetadata, withBoundGenericTypes, withTypeArguments, withTypeArgumentsMethods inherited from interface Element
annotate, annotate, annotate, annotate, annotate, getDescription, getDescription, getDocumentation, getDocumentation, getModifiers, getName, getNativeType, isAbstract, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isSynthetic, removeAnnotation, removeAnnotation, removeAnnotationIf, removeStereotype, removeStereotypeMethods inherited from interface TypedElement
getArrayDimensions, getGenericType, isArray, isPrimitive, isVoid
-
Constructor Details
-
PythonAnnotationElement
- Parameters:
classDef- The class definition synthesized for the decoratorenvironment- The environment
-
-
Method Details
-
copyThis
- Overrides:
copyThisin classPythonClassElement- Returns:
- copy of this element
-
isInherited
public boolean isInherited()Description copied from interface:AnnotationElementIs the annotation annotated withInherited?Meta-annotations from the
java.lang.annotationpackage are excluded from the annotation metadata (seeAnnotationUtil.STEREOTYPE_EXCLUDES), so the answer cannot be retrieved withAnnotationMetadata.hasDeclaredAnnotation(String). Implementations backed by a native element resolve it from that element instead; the default implementation, for implementations that have no native element to inspect, always returnsfalse.- Specified by:
isInheritedin interfaceAnnotationElement- Returns:
trueif the annotation type is declaredInherited
-
makeCopy
protected final io.micronaut.python.processing.element.AbstractPythonElement makeCopy() -
getName
-
isProtected
public boolean isProtected()- Specified by:
isProtectedin interfaceElement- Returns:
- True if the element is protected.
-
isPublic
-
getModifiers
Python has no access modifiers, so the modifiers are derived from the visibility, static, abstract and final predicates of the element: an element is public unless its name marks it private, which keeps the modifier set consistent withElement.isPublic(),Element.isStatic(),Element.isAbstract()andElement.isFinal()for the callers that filter on modifiers, such asElementQuery.modifiers(...)andBeanElementBuilder.produceBeans(...).- Specified by:
getModifiersin interfaceElement- Returns:
- The modifiers
-
equals
-
hashCode
-