Class AbstractJavaElement

java.lang.Object
io.micronaut.inject.ast.annotation.AbstractAnnotationElement
io.micronaut.annotation.processing.visitor.AbstractJavaElement
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.Element
Direct Known Subclasses:
JavaClassElement, JavaMethodElement, JavaPackageElement

@Internal public abstract class AbstractJavaElement extends io.micronaut.inject.ast.annotation.AbstractAnnotationElement
An abstract class for other elements to extend from.
Since:
1.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final JavaVisitorContext
     

    Fields inherited from class io.micronaut.inject.ast.annotation.AbstractAnnotationElement

    elementAnnotationMetadataFactory, presetAnnotationMetadata

    Fields inherited from interface io.micronaut.core.annotation.AnnotationMetadata

    CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBER

    Fields inherited from interface io.micronaut.core.annotation.AnnotationSource

    EMPTY

    Fields inherited from interface io.micronaut.inject.ast.Element

    EMPTY_ELEMENT_ARRAY

    Fields inherited from interface io.micronaut.inject.ast.annotation.MutableAnnotationMetadataDelegate

    EMPTY
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract AbstractJavaElement
     
    protected void
     
    boolean
     
     
    Set<io.micronaut.inject.ast.ElementModifier>
     
     
     
    int
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    protected final AbstractJavaElement
     
    protected final @NonNull io.micronaut.inject.ast.ClassElement
    newClassElement(JavaNativeElement owner, TypeMirror type, Map<String,io.micronaut.inject.ast.ClassElement> declaredElementTypeArguments)
    Obtain the ClassElement for the given mirror.
    protected final @NonNull io.micronaut.inject.ast.ClassElement
    newClassElement(TypeMirror type, Map<String,io.micronaut.inject.ast.ClassElement> declaredElementTypeArguments)
    Obtain the ClassElement for the given mirror.
    protected final Map<String,io.micronaut.inject.ast.ClassElement>
    resolveTypeArguments(ExecutableElement executableElement, Map<String,io.micronaut.inject.ast.ClassElement> parentTypeArguments)
     
    protected final Map<String,io.micronaut.inject.ast.ClassElement>
    resolveTypeArguments(TypeElement typeElement, @Nullable List<? extends TypeMirror> typeMirrorArguments)
     
     
    io.micronaut.inject.ast.Element
    withAnnotationMetadata(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata)
     

    Methods inherited from class io.micronaut.inject.ast.annotation.AbstractAnnotationElement

    annotate, annotate, annotate, annotate, annotate, getAnnotationMetadata, getAnnotationMetadataToWrite, getElementAnnotationMetadata, getElementAnnotationMetadataFactory, removeAnnotation, removeAnnotation, removeAnnotationIf, removeStereotype, removeStereotype

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface io.micronaut.core.annotation.AnnotatedElement

    isDeclaredNonNull, isDeclaredNullable, isNonNull, isNullable

    Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadata

    enumValuesSet, enumValuesSet, getValues, hasDeclaredStereotype, hasEvaluatedExpressions, hasStereotypeNonRepeating, isAnnotationPresent, isDeclaredAnnotationPresent

    Methods 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, 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.inject.ast.Element

    getDescription, getDescription, getSimpleName, isSynthetic
  • Field Details

  • Method Details

    • copyThis

      protected abstract AbstractJavaElement copyThis()
      Returns:
      copy of this element
    • copyValues

      protected void copyValues(AbstractJavaElement element)
      Parameters:
      element - the values to be copied to
    • makeCopy

      protected final AbstractJavaElement makeCopy()
    • withAnnotationMetadata

      public io.micronaut.inject.ast.Element withAnnotationMetadata(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata)
    • isPackagePrivate

      public boolean isPackagePrivate()
    • getName

      public String getName()
    • getModifiers

      public Set<io.micronaut.inject.ast.ElementModifier> getModifiers()
    • getDocumentation

      public Optional<String> getDocumentation()
    • isAbstract

      public boolean isAbstract()
    • isStatic

      public boolean isStatic()
    • isPublic

      public boolean isPublic()
    • isPrivate

      public boolean isPrivate()
    • isFinal

      public boolean isFinal()
    • isProtected

      public boolean isProtected()
    • getNativeType

      public JavaNativeElement getNativeType()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • newClassElement

      @NonNull protected final @NonNull io.micronaut.inject.ast.ClassElement newClassElement(JavaNativeElement owner, TypeMirror type, Map<String,io.micronaut.inject.ast.ClassElement> declaredElementTypeArguments)
      Obtain the ClassElement for the given mirror.
      Parameters:
      owner - The owner
      type - The type
      declaredElementTypeArguments - The type arguments of the declaring element (method, class)
      Returns:
      The class element
    • newClassElement

      @NonNull protected final @NonNull io.micronaut.inject.ast.ClassElement newClassElement(TypeMirror type, Map<String,io.micronaut.inject.ast.ClassElement> declaredElementTypeArguments)
      Obtain the ClassElement for the given mirror.
      Parameters:
      type - The type
      declaredElementTypeArguments - The type arguments of the declaring element (method, class)
      Returns:
      The class element
    • resolveTypeArguments

      protected final Map<String,io.micronaut.inject.ast.ClassElement> resolveTypeArguments(TypeElement typeElement, @Nullable @Nullable List<? extends TypeMirror> typeMirrorArguments)
    • resolveTypeArguments

      protected final Map<String,io.micronaut.inject.ast.ClassElement> resolveTypeArguments(ExecutableElement executableElement, Map<String,io.micronaut.inject.ast.ClassElement> parentTypeArguments)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object