Class PythonPropertyParameterElement
java.lang.Object
io.micronaut.inject.ast.annotation.AbstractAnnotationElement
io.micronaut.python.processing.visitor.PythonPropertyParameterElement
- All Implemented Interfaces:
AnnotatedElement, AnnotationMetadata, AnnotationMetadataDelegate, AnnotationMetadataProvider, AnnotationSource, Described, Named, MutableAnnotationMetadataDelegate<Element>, Element, ParameterElement, TypedElement
public final class PythonPropertyParameterElement
extends AbstractAnnotationElement
implements ParameterElement
A synthetic parameter element for Python property setter methods.
This allows synthetic property setter parameters to support annotation mutation,
unlike ParameterElement.of() which creates immutable elements.
- Since:
- 5.2.0
- Author:
- Micronaut Team
-
Field Summary
Fields 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 Element
EMPTY_ELEMENT_ARRAYFields inherited from interface MutableAnnotationMetadataDelegate
EMPTYFields inherited from interface ParameterElement
ZERO_PARAMETER_ELEMENTS -
Constructor Summary
ConstructorsConstructorDescriptionPythonPropertyParameterElement(PythonPropertyElement propertyElement, ElementAnnotationMetadataFactory metadataFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected PythonPropertyParameterElementcopyThis()protected voidcopyValues(io.micronaut.python.processing.visitor.AbstractPythonElement element) booleanSupplies the metadata.protected MutableAnnotationMetadataDelegate<?> Get annotation metadata to add or remove annotations.protected ElementAnnotationMetadataReturns the generic type of the element.getName()Returns the native underlying type.getType()inthashCode()booleanbooleanisPublic()protected final io.micronaut.python.processing.visitor.AbstractPythonElementmakeCopy()withAnnotationMetadata(AnnotationMetadata annotationMetadata) Copies this element and overrides its annotations.Methods inherited from class AbstractAnnotationElement
annotate, annotate, annotate, annotate, annotate, getElementAnnotationMetadataFactory, removeAnnotation, removeAnnotation, removeAnnotationIf, removeStereotype, removeStereotypeMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods 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 Element
annotate, annotate, annotate, annotate, annotate, getDescription, getDocumentation, getDocumentation, getModifiers, getSimpleName, isAbstract, isFinal, isPackagePrivate, isPrivate, isStatic, isSynthetic, removeAnnotation, removeAnnotation, removeAnnotationIf, removeStereotype, removeStereotypeMethods inherited from interface ParameterElement
getDescription, getMethodElementMethods inherited from interface TypedElement
getArrayDimensions, isArray, isPrimitive, isVoid
-
Constructor Details
-
PythonPropertyParameterElement
public PythonPropertyParameterElement(PythonPropertyElement propertyElement, ElementAnnotationMetadataFactory metadataFactory)
-
-
Method Details
-
getAnnotationMetadata
Description copied from interface:AnnotationMetadataProviderSupplies the metadata. Defaults toAnnotationMetadata.EMPTY_METADATA.- Specified by:
getAnnotationMetadatain interfaceAnnotationMetadataProvider- Overrides:
getAnnotationMetadatain classAbstractAnnotationElement- Returns:
- The
AnnotationMetadata
-
getElementAnnotationMetadata
- Overrides:
getElementAnnotationMetadatain classAbstractAnnotationElement- Returns:
- The element's annotation metadata
-
getAnnotationMetadataToWrite
Description copied from class:AbstractAnnotationElementGet annotation metadata to add or remove annotations.- Overrides:
getAnnotationMetadataToWritein classAbstractAnnotationElement- Returns:
- The annotation metadata to write
-
getNativeType
Description copied from interface:ElementReturns the native underlying type. This API is extended by all inject language implementations. The object returned by this method will be the language native type the information is being retrieved from.- Specified by:
getNativeTypein interfaceElement- Returns:
- The native type
-
getName
-
getType
- Specified by:
getTypein interfaceParameterElement- Specified by:
getTypein interfaceTypedElement- Returns:
- The type of the parameter
-
getGenericType
Description copied from interface:TypedElementReturns the generic type of the element. This differs fromTypedElement.getType()as it returns the actual type without erasure. WhilstTypedElement.getType()is often needed to produce the correct byte code when generating code via ASM, thegetGenericType()method is more useful for documentation and other types of code generation.- Specified by:
getGenericTypein interfaceTypedElement- Returns:
- The generic type
-
isProtected
public boolean isProtected()- Specified by:
isProtectedin interfaceElement- Returns:
- True if the element is protected.
-
isPublic
-
withAnnotationMetadata
Description copied from interface:ElementCopies this element and overrides its annotations.- Specified by:
withAnnotationMetadatain interfaceElement- Specified by:
withAnnotationMetadatain interfaceParameterElement- Parameters:
annotationMetadata- The annotation metadata- Returns:
- A new element
-
equals
-
hashCode
public int hashCode() -
copyThis
- Returns:
- copy of this element
-
copyValues
protected void copyValues(io.micronaut.python.processing.visitor.AbstractPythonElement element) - Parameters:
element- the values to be copied to
-
makeCopy
protected final io.micronaut.python.processing.visitor.AbstractPythonElement makeCopy()
-