Class AbstractJavaElement

java.lang.Object
io.micronaut.inject.ast.annotation.AbstractAnnotationElement
io.micronaut.annotation.processing.visitor.AbstractJavaElement
All Implemented Interfaces:
ElementProvider, 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:
AbstractTypeAwareJavaElement, JavaPackageElement

@Internal public abstract class AbstractJavaElement extends io.micronaut.inject.ast.annotation.AbstractAnnotationElement implements ElementProvider
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
     
    getDocumentation(boolean parse)
     
    Set<io.micronaut.inject.ast.ElementModifier>
     
     
     
    int
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    protected final AbstractJavaElement
     
    protected final io.micronaut.inject.ast.ClassElement
    newClassElement(@Nullable JavaNativeElement owner, TypeMirror type, Map<String, io.micronaut.inject.ast.ClassElement> declaredElementTypeArguments)
    Obtain the ClassElement for the given mirror.
    protected final io.micronaut.inject.ast.ClassElement
    newClassElement(@Nullable JavaNativeElement owner, TypeMirror type, Map<String, io.micronaut.inject.ast.ClassElement> declaredElementTypeArguments, @Nullable String doc)
    Obtain the ClassElement for the given mirror.
    protected final 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 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, getDocumentation, getSimpleName, isSynthetic
  • Field Details

  • Method Details

    • element

      @Nullable public Element element()
      Specified by:
      element in interface ElementProvider
      Returns:
      The native element.
    • 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)
      Specified by:
      withAnnotationMetadata in interface io.micronaut.inject.ast.Element
    • isPackagePrivate

      public boolean isPackagePrivate()
      Specified by:
      isPackagePrivate in interface io.micronaut.inject.ast.Element
    • getName

      public String getName()
      Specified by:
      getName in interface io.micronaut.inject.ast.Element
      Specified by:
      getName in interface io.micronaut.core.naming.Named
    • getModifiers

      public Set<io.micronaut.inject.ast.ElementModifier> getModifiers()
      Specified by:
      getModifiers in interface io.micronaut.inject.ast.Element
    • getDocumentation

      public Optional<String> getDocumentation(boolean parse)
      Specified by:
      getDocumentation in interface io.micronaut.inject.ast.Element
    • isAbstract

      public boolean isAbstract()
      Specified by:
      isAbstract in interface io.micronaut.inject.ast.Element
    • isStatic

      public boolean isStatic()
      Specified by:
      isStatic in interface io.micronaut.inject.ast.Element
    • isPublic

      public boolean isPublic()
      Specified by:
      isPublic in interface io.micronaut.inject.ast.Element
    • isPrivate

      public boolean isPrivate()
      Specified by:
      isPrivate in interface io.micronaut.inject.ast.Element
    • isFinal

      public boolean isFinal()
      Specified by:
      isFinal in interface io.micronaut.inject.ast.Element
    • isProtected

      public boolean isProtected()
      Specified by:
      isProtected in interface io.micronaut.inject.ast.Element
    • getNativeType

      public JavaNativeElement getNativeType()
      Specified by:
      getNativeType in interface io.micronaut.inject.ast.Element
    • toString

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

      protected final io.micronaut.inject.ast.ClassElement newClassElement(@Nullable 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

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

      protected final 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 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