Class ScalaClassElement
- All Implemented Interfaces:
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, io.micronaut.core.naming.Described, io.micronaut.core.naming.Named, io.micronaut.inject.ast.annotation.MutableAnnotationMetadataDelegate<io.micronaut.inject.ast.Element>, io.micronaut.inject.ast.ArrayableClassElement, io.micronaut.inject.ast.ClassElement, io.micronaut.inject.ast.Element, io.micronaut.inject.ast.TypedElement
-
Field Summary
Fields inherited from interface io.micronaut.core.annotation.AnnotationMetadata
CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBERFields inherited from interface io.micronaut.core.annotation.AnnotationSource
EMPTYFields inherited from interface io.micronaut.inject.ast.ClassElement
ZERO_CLASS_ELEMENTSFields inherited from interface io.micronaut.inject.ast.Element
EMPTY_ELEMENT_ARRAYFields inherited from interface io.micronaut.inject.ast.annotation.MutableAnnotationMetadataDelegate
EMPTY -
Method Summary
Modifier and TypeMethodDescriptionio.micronaut.inject.ast.beans.BeanElementBuilderaddAssociatedBean(io.micronaut.inject.ast.ClassElement type) <T extends Annotation>
io.micronaut.inject.ast.Elementannotate(io.micronaut.core.annotation.AnnotationValue<T> annotationValue) <T extends Annotation>
io.micronaut.inject.ast.Elementannotate(String annotationType, Consumer<io.micronaut.core.annotation.AnnotationValueBuilder<T>> consumer) protected Objectprotected Class<?> booleanio.micronaut.core.annotation.AnnotationMetadataprotected io.micronaut.inject.ast.annotation.MutableAnnotationMetadataDelegate<?> intList<io.micronaut.inject.ast.PropertyElement> List<io.micronaut.inject.ast.PropertyElement> getBeanProperties(io.micronaut.inject.ast.PropertyElementQuery propertyElementQuery) The source-level name of the type, with nested types separated by a dot.List<? extends io.micronaut.inject.ast.GenericPlaceholderElement> Optional<io.micronaut.inject.ast.MethodElement> getDocumentation(boolean parse) protected io.micronaut.inject.ast.annotation.ElementAnnotationMetadata<T extends io.micronaut.inject.ast.Element>
List<T> getEnclosedElements(io.micronaut.inject.ast.ElementQuery<T> query) Optional<io.micronaut.inject.ast.ClassElement> Collection<io.micronaut.inject.ast.ClassElement> Set<io.micronaut.inject.ast.ElementModifier> getName()io.micronaut.inject.ast.PackageElementOptional<io.micronaut.inject.ast.MethodElement> Optional<io.micronaut.inject.ast.ClassElement> List<io.micronaut.inject.ast.PropertyElement> io.micronaut.inject.ast.annotation.MutableAnnotationMetadataDelegate<io.micronaut.core.annotation.AnnotationMetadata> inthashCode()booleanbooleanisAssignable(io.micronaut.inject.ast.ClassElement type) Whether this element is assignable to the given element, which unlike a name can be an array.booleanisAssignable(String type) Whether this element is assignable to the named type.booleanbooleanisEnum()booleanisFinal()booleanisInner()booleanbooleanbooleanbooleanbooleanbooleanisPublic()booleanisRecord()A Java record, which is the one kind of class that extendsjava.lang.Record: the language allows no other, and the compiler recognises a record the same way.booleanisStatic()io.micronaut.inject.ast.ElementremoveAnnotation(String annotationType) <T extends Annotation>
io.micronaut.inject.ast.ElementremoveAnnotationIf(Predicate<io.micronaut.core.annotation.AnnotationValue<T>> predicate) io.micronaut.inject.ast.ElementremoveStereotype(String annotationType) io.micronaut.inject.ast.ClassElementwithAnnotationMetadata(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata) io.micronaut.inject.ast.ClassElementwithArrayDimensions(int arrayDimensions) io.micronaut.inject.ast.ClassElementwithTypeArguments(Map<String, io.micronaut.inject.ast.ClassElement> typeArguments) Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.core.annotation.AnnotatedElement
isDeclaredNonNull, isDeclaredNullable, isNonNull, isNullableMethods inherited from interface io.micronaut.core.annotation.AnnotationMetadata
enumValuesSet, enumValuesSet, getValues, hasDeclaredStereotype, hasStereotypeNonRepeating, isAnnotationPresent, isDeclaredAnnotationPresentMethods inherited from interface io.micronaut.core.annotation.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 io.micronaut.core.annotation.AnnotationMetadataProvider
getAnnotationMetadataMethods inherited from interface io.micronaut.inject.ast.ArrayableClassElement
fromArray, toArrayMethods inherited from interface io.micronaut.inject.ast.ClassElement
findDefaultStaticCreator, findField, findMethod, findStaticCreator, foldBoundGenericTypes, getAccessibleConstructors, getAccessibleStaticCreators, getBoundGenericTypes, getEnclosedElement, getFields, getFirstTypeArgument, getMethods, getOptionalValueType, getPermittedSubclasses, getRawClassElement, getSimpleName, getType, getTypeArguments, getTypeArguments, hasUnresolvedTypes, isAssignable, isGenericPlaceholder, isIterable, isOptional, isProxy, isRawType, isSealed, isTypeVariable, isWildcard, withBoundGenericTypes, withTypeArgumentsMethods inherited from interface io.micronaut.inject.ast.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 io.micronaut.inject.ast.TypedElement
getGenericType, isArray, isVoid
-
Method Details
-
isInterface
public boolean isInterface()- Specified by:
isInterfacein interfaceio.micronaut.inject.ast.ClassElement
-
isEnum
public boolean isEnum()- Specified by:
isEnumin interfaceio.micronaut.inject.ast.ClassElement
-
isRecord
public boolean isRecord()A Java record, which is the one kind of class that extendsjava.lang.Record: the language allows no other, and the compiler recognises a record the same way. Scala has no records, so this is only ever true of a class read from the classpath.- Specified by:
isRecordin interfaceio.micronaut.inject.ast.ClassElement
-
getTypeAnnotationMetadata
public io.micronaut.inject.ast.annotation.MutableAnnotationMetadataDelegate<io.micronaut.core.annotation.AnnotationMetadata> getTypeAnnotationMetadata()- Specified by:
getTypeAnnotationMetadatain interfaceio.micronaut.inject.ast.ClassElement
-
isAssignable
Whether this element is assignable to the named type.A type name carries no array dimensions -- an element for
Array[String]is namedjava.lang.Stringand reports one dimension separately -- so this used to answer for the component type and callArray[String]assignable toString, andArray[Array[String]]assignable toArray[String]. Micronaut matches bean types,@Requiresconditions and executable handlers through this method, so an array bean satisfied an injection point for its component type. An array is assignable by name only to the three types every array really is.- Specified by:
isAssignablein interfaceio.micronaut.inject.ast.ClassElement
-
isAssignable
public boolean isAssignable(io.micronaut.inject.ast.ClassElement type) Whether this element is assignable to the given element, which unlike a name can be an array. Core's default delegates toisAssignable(String), which discards the dimensions of both sides.- Specified by:
isAssignablein interfaceio.micronaut.inject.ast.ClassElement
-
getSuperType
- Specified by:
getSuperTypein interfaceio.micronaut.inject.ast.ClassElement
-
getInterfaces
- Specified by:
getInterfacesin interfaceio.micronaut.inject.ast.ClassElement
-
isInner
public boolean isInner()- Specified by:
isInnerin interfaceio.micronaut.inject.ast.ClassElement
-
getEnclosingType
- Specified by:
getEnclosingTypein interfaceio.micronaut.inject.ast.ClassElement
-
addAssociatedBean
public io.micronaut.inject.ast.beans.BeanElementBuilder addAssociatedBean(io.micronaut.inject.ast.ClassElement type) - Specified by:
addAssociatedBeanin interfaceio.micronaut.inject.ast.ClassElement
-
getTypeArguments
-
getDeclaredGenericPlaceholders
public List<? extends io.micronaut.inject.ast.GenericPlaceholderElement> getDeclaredGenericPlaceholders()- Specified by:
getDeclaredGenericPlaceholdersin interfaceio.micronaut.inject.ast.ClassElement
-
getBeanProperties
- Specified by:
getBeanPropertiesin interfaceio.micronaut.inject.ast.ClassElement
-
getSyntheticBeanProperties
- Specified by:
getSyntheticBeanPropertiesin interfaceio.micronaut.inject.ast.ClassElement
-
getBeanProperties
public List<io.micronaut.inject.ast.PropertyElement> getBeanProperties(io.micronaut.inject.ast.PropertyElementQuery propertyElementQuery) - Specified by:
getBeanPropertiesin interfaceio.micronaut.inject.ast.ClassElement
-
getPrimaryConstructor
- Specified by:
getPrimaryConstructorin interfaceio.micronaut.inject.ast.ClassElement
-
getDefaultConstructor
- Specified by:
getDefaultConstructorin interfaceio.micronaut.inject.ast.ClassElement
-
getEnclosedElements
public <T extends io.micronaut.inject.ast.Element> List<T> getEnclosedElements(io.micronaut.inject.ast.ElementQuery<T> query) - Specified by:
getEnclosedElementsin interfaceio.micronaut.inject.ast.ClassElement
-
getPackageName
- Specified by:
getPackageNamein interfaceio.micronaut.inject.ast.ClassElement
-
getCanonicalName
The source-level name of the type, with nested types separated by a dot.Core's default returns
Element.getName(), which is the binary name --nest.Outer$Inner. The Java module answers with the qualified name,nest.Outer.Inner, and this is what reaches users in diagnostics and in introspection naming.- Specified by:
getCanonicalNamein interfaceio.micronaut.inject.ast.ClassElement
-
getPackage
public io.micronaut.inject.ast.PackageElement getPackage()- Specified by:
getPackagein interfaceio.micronaut.inject.ast.ClassElement
-
withArrayDimensions
public io.micronaut.inject.ast.ClassElement withArrayDimensions(int arrayDimensions) - Specified by:
withArrayDimensionsin interfaceio.micronaut.inject.ast.ArrayableClassElement
-
getArrayDimensions
public int getArrayDimensions()- Specified by:
getArrayDimensionsin interfaceio.micronaut.inject.ast.TypedElement
-
isPrimitive
public boolean isPrimitive()- Specified by:
isPrimitivein interfaceio.micronaut.inject.ast.TypedElement
-
isContainerType
public boolean isContainerType()- Specified by:
isContainerTypein interfaceio.micronaut.inject.ast.ClassElement
-
getAllTypeArguments
-
withTypeArguments
-
withAnnotationMetadata
public io.micronaut.inject.ast.ClassElement withAnnotationMetadata(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata) - Specified by:
withAnnotationMetadatain interfaceio.micronaut.inject.ast.ClassElement- Specified by:
withAnnotationMetadatain interfaceio.micronaut.inject.ast.Element
-
equalityType
-
equalityKey
-
rawDocumentation
-
getDocumentation
-
getName
- Specified by:
getNamein interfaceio.micronaut.inject.ast.Element- Specified by:
getNamein interfaceio.micronaut.core.naming.Named
-
isProtected
public boolean isProtected()- Specified by:
isProtectedin interfaceio.micronaut.inject.ast.Element
-
isPublic
public boolean isPublic()- Specified by:
isPublicin interfaceio.micronaut.inject.ast.Element
-
isPrivate
public boolean isPrivate()- Specified by:
isPrivatein interfaceio.micronaut.inject.ast.Element
-
isPackagePrivate
public boolean isPackagePrivate()- Specified by:
isPackagePrivatein interfaceio.micronaut.inject.ast.Element
-
isAbstract
public boolean isAbstract()- Specified by:
isAbstractin interfaceio.micronaut.inject.ast.Element
-
isStatic
public boolean isStatic()- Specified by:
isStaticin interfaceio.micronaut.inject.ast.Element
-
isFinal
public boolean isFinal()- Specified by:
isFinalin interfaceio.micronaut.inject.ast.Element
-
getModifiers
- Specified by:
getModifiersin interfaceio.micronaut.inject.ast.Element
-
getNativeType
- Specified by:
getNativeTypein interfaceio.micronaut.inject.ast.Element
-
getAnnotationMetadata
public io.micronaut.core.annotation.AnnotationMetadata getAnnotationMetadata()- Specified by:
getAnnotationMetadatain interfaceio.micronaut.core.annotation.AnnotationMetadataProvider
-
getElementAnnotationMetadata
protected io.micronaut.inject.ast.annotation.ElementAnnotationMetadata getElementAnnotationMetadata() -
getAnnotationMetadataToWrite
protected io.micronaut.inject.ast.annotation.MutableAnnotationMetadataDelegate<?> getAnnotationMetadataToWrite() -
annotate
public <T extends Annotation> io.micronaut.inject.ast.Element annotate(String annotationType, Consumer<io.micronaut.core.annotation.AnnotationValueBuilder<T>> consumer) - Specified by:
annotatein interfaceio.micronaut.inject.ast.Element- Specified by:
annotatein interfaceio.micronaut.inject.ast.annotation.MutableAnnotationMetadataDelegate<io.micronaut.inject.ast.Element>
-
annotate
public <T extends Annotation> io.micronaut.inject.ast.Element annotate(io.micronaut.core.annotation.AnnotationValue<T> annotationValue) - Specified by:
annotatein interfaceio.micronaut.inject.ast.Element- Specified by:
annotatein interfaceio.micronaut.inject.ast.annotation.MutableAnnotationMetadataDelegate<io.micronaut.inject.ast.Element>
-
removeAnnotation
- Specified by:
removeAnnotationin interfaceio.micronaut.inject.ast.Element- Specified by:
removeAnnotationin interfaceio.micronaut.inject.ast.annotation.MutableAnnotationMetadataDelegate<io.micronaut.inject.ast.Element>
-
removeAnnotationIf
public <T extends Annotation> io.micronaut.inject.ast.Element removeAnnotationIf(Predicate<io.micronaut.core.annotation.AnnotationValue<T>> predicate) - Specified by:
removeAnnotationIfin interfaceio.micronaut.inject.ast.Element- Specified by:
removeAnnotationIfin interfaceio.micronaut.inject.ast.annotation.MutableAnnotationMetadataDelegate<io.micronaut.inject.ast.Element>
-
removeStereotype
- Specified by:
removeStereotypein interfaceio.micronaut.inject.ast.Element- Specified by:
removeStereotypein interfaceio.micronaut.inject.ast.annotation.MutableAnnotationMetadataDelegate<io.micronaut.inject.ast.Element>
-
equals
-
hashCode
-