Class PythonGenericPlaceholderElement
java.lang.Object
io.micronaut.inject.ast.annotation.AbstractAnnotationElement
io.micronaut.python.processing.visitor.AbstractPythonClassElement
io.micronaut.python.processing.visitor.PythonGenericPlaceholderElement
- All Implemented Interfaces:
ElementProvider, AnnotatedElement, AnnotationMetadata, AnnotationMetadataDelegate, AnnotationMetadataProvider, AnnotationSource, Described, Named, MutableAnnotationMetadataDelegate<Element>, ArrayableClassElement, ClassElement, Element, GenericElement, GenericPlaceholderElement, TypedElement
public final class PythonGenericPlaceholderElement
extends AbstractPythonClassElement
implements GenericPlaceholderElement
Implementation of
GenericPlaceholderElement for Python TypeVars.- Since:
- 5.2.0
- Author:
- Micronaut
-
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
ConstructorsConstructorDescriptionPythonGenericPlaceholderElement(TypeVar typeVar, PythonProcessingEnvironment environment, List<ClassElement> bounds) PythonGenericPlaceholderElement(TypeVar typeVar, PythonProcessingEnvironment environment, List<ClassElement> bounds, Element declaringElement) -
Method Summary
Modifier and TypeMethodDescriptionprotected io.micronaut.python.processing.visitor.AbstractPythonElementcopyThis()protected ClassElementcreateWithArrayDimensions(int arrayDimensions) boolean@NonNull List<? extends ClassElement> Returns the bounds of this the generic placeholder empty.getName()inthashCode()booleanisAssignable(String type) Tests whether one type is assignable to another.booleanbooleanisPublic()booleanIs raw type.booleanIn this case of callingClassElement.getTypeArguments()a returnedClassElementmay represent a type variable in which case this method will returntrue.protected final io.micronaut.python.processing.visitor.AbstractPythonElementmakeCopy()toString()Methods inherited from class AbstractPythonClassElement
copyValues, element, excludeIntrospectedProperties, findPythonClass, getAnnotationMetadata, getAnnotationMetadataToWrite, getArrayDimensions, getBeanProperties, getBeanProperties, getDocumentation, getEnclosedElements, getFields, getInterfaces, 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, isContainerType, isEnum, isGenericPlaceholder, isInner, isInterface, isIterable, isOptional, isProxy, isRecord, isSealed, 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 GenericElement
getGenericNativeType, getGenericTypeAnnotationMetadata, resolvedMethods inherited from interface GenericPlaceholderElement
getRequiredDeclaringElement, getResolvedMethods inherited from interface TypedElement
getArrayDimensions, getGenericType, isArray, isPrimitive, isVoid
-
Constructor Details
-
PythonGenericPlaceholderElement
public PythonGenericPlaceholderElement(TypeVar typeVar, PythonProcessingEnvironment environment, List<ClassElement> bounds) -
PythonGenericPlaceholderElement
public PythonGenericPlaceholderElement(TypeVar typeVar, PythonProcessingEnvironment environment, List<ClassElement> bounds, Element declaringElement)
-
-
Method Details
-
createWithArrayDimensions
- Specified by:
createWithArrayDimensionsin classAbstractPythonClassElement
-
copyThis
protected io.micronaut.python.processing.visitor.AbstractPythonElement copyThis()- Specified by:
copyThisin classAbstractPythonClassElement- Returns:
- copy of this element
-
isTypeVariable
public boolean isTypeVariable()Description copied from interface:ClassElementIn this case of callingClassElement.getTypeArguments()a returnedClassElementmay represent a type variable in which case this method will returntrue.- Specified by:
isTypeVariablein interfaceClassElement- Returns:
- Is this type a type variable.
-
isRawType
public boolean isRawType()Description copied from interface:ClassElementIs raw type.- Specified by:
isRawTypein interfaceClassElement- Returns:
- true if the type is raw
-
getBounds
Description copied from interface:GenericPlaceholderElementReturns the bounds of this the generic placeholder empty. Always returns a non-empty list.- Specified by:
getBoundsin interfaceGenericPlaceholderElement- Returns:
- The bounds declared for this type variable.
-
getVariableName
- Specified by:
getVariableNamein interfaceGenericPlaceholderElement- Returns:
- The name of the placeholder variable.
-
getDeclaringElement
- Specified by:
getDeclaringElementin interfaceGenericPlaceholderElement- Returns:
- The element declaring this variable, if it can be determined. Must be either a method or a class.
-
isAssignable
Description copied from interface:ClassElementTests whether one type is assignable to another.- Specified by:
isAssignablein interfaceClassElement- Parameters:
type- The type to check- Returns:
trueif and only if this type is assignable to the second
-
toString
-
makeCopy
protected final io.micronaut.python.processing.visitor.AbstractPythonElement makeCopy() -
getName
-
isProtected
public boolean isProtected()- Specified by:
isProtectedin interfaceElement- Returns:
- True if the element is protected.
-
isPublic
-
equals
-
hashCode
-