Package io.micronaut.inject.ast
Interface GenericPlaceholderElement
-
- All Superinterfaces:
io.micronaut.core.annotation.AnnotatedElement
,io.micronaut.core.annotation.AnnotationMetadata
,io.micronaut.core.annotation.AnnotationMetadataDelegate
,io.micronaut.core.annotation.AnnotationMetadataProvider
,io.micronaut.core.annotation.AnnotationSource
,ClassElement
,io.micronaut.core.naming.Described
,Element
,io.micronaut.core.naming.Named
,TypedElement
public interface GenericPlaceholderElement extends ClassElement
Represents a generic placeholder in source code. A placeholder is a generic type that has not yet had the type bound yet –List<T>
has a generic placeholder, whilstList<String>
does not.For compatibility, this a
GenericPlaceholderElement
acts like its first upper bound when used as aClassElement
.- Since:
- 3.1.0
-
-
Field Summary
-
Fields inherited from interface io.micronaut.core.annotation.AnnotationMetadata
CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBER
-
Fields inherited from interface io.micronaut.inject.ast.ClassElement
ZERO_CLASS_ELEMENTS
-
Fields inherited from interface io.micronaut.inject.ast.Element
EMPTY_ELEMENT_ARRAY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<? extends ClassElement>
getBounds()
Returns the bounds of this the generic placeholder empty.java.util.Optional<Element>
getDeclaringElement()
java.lang.String
getVariableName()
-
Methods inherited from interface io.micronaut.core.annotation.AnnotatedElement
isDeclaredNonNull, isDeclaredNullable, isNonNull, isNullable
-
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadata
getAnnotationValuesByName, getAnnotationValuesByStereotype, getDeclaredAnnotationValuesByName, getValues, hasDeclaredStereotype, isAnnotationPresent, isDeclaredAnnotationPresent
-
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataDelegate
booleanValue, booleanValue, booleanValue, booleanValue, classValue, classValue, classValue, classValue, classValues, classValues, classValues, classValues, 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, getAnnotationValuesByType, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationValuesByType, getDeclaredMetadata, getDeclaredStereotypeAnnotationNames, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValues, getStereotypeAnnotationNames, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValues, getValues, hasAnnotation, hasAnnotation, hasDeclaredAnnotation, hasDeclaredAnnotation, hasDeclaredStereotype, hasDeclaredStereotype, hasDeclaredStereotype, 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, synthesizeDeclaredAnnotationsByType
-
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider
getAnnotationMetadata
-
Methods inherited from interface io.micronaut.inject.ast.ClassElement
addAssociatedBean, foldBoundGenericTypes, fromArray, getAllTypeArguments, getBeanProperties, getBoundGenericTypes, getCanonicalName, getDeclaredGenericPlaceholders, getDefaultConstructor, getEnclosedElement, getEnclosedElements, getEnclosingType, getFields, getFields, getFirstTypeArgument, getInterfaces, getPackage, getPackageName, getPrimaryConstructor, getRawClassElement, getSimpleName, getSuperType, getType, getTypeArguments, getTypeArguments, getTypeArguments, isAssignable, isAssignable, isAssignable, isEnum, isGenericPlaceholder, isInner, isInterface, isIterable, isOptional, isProxy, isRecord, isTypeVariable, isWildcard, toArray, withBoundGenericTypes
-
Methods inherited from interface io.micronaut.inject.ast.Element
annotate, annotate, annotate, annotate, annotate, getDescription, getDescription, getDocumentation, getModifiers, getName, getNativeType, isAbstract, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, removeAnnotation, removeAnnotation, removeAnnotationIf, removeStereotype, removeStereotype
-
Methods inherited from interface io.micronaut.inject.ast.TypedElement
getArrayDimensions, getGenericType, isArray, isPrimitive
-
-
-
-
Method Detail
-
getBounds
@NonNull java.util.List<? extends ClassElement> getBounds()
Returns the bounds of this the generic placeholder empty. Always returns a non-empty list.- Returns:
- The bounds declared for this type variable.
-
getVariableName
@NonNull java.lang.String getVariableName()
- Returns:
- The name of the placeholder variable.
-
getDeclaringElement
java.util.Optional<Element> getDeclaringElement()
- Returns:
- The element declaring this variable, if it can be determined. Must be either a method or a class.
-
-