Class AbstractJavaElement
java.lang.Object
io.micronaut.inject.ast.annotation.AbstractAnnotationElement
io.micronaut.annotation.processing.visitor.AbstractJavaElement
- All Implemented Interfaces:
ElementProvider, AnnotatedElement, AnnotationMetadata, AnnotationMetadataDelegate, AnnotationMetadataProvider, AnnotationSource, Described, Named, MutableAnnotationMetadataDelegate<Element>, Element
- Direct Known Subclasses:
AbstractTypeAwareJavaElement, JavaPackageElement
@Internal
public abstract class AbstractJavaElement
extends AbstractAnnotationElement
implements ElementProvider
An abstract class for other elements to extend from.
- Since:
- 1.0
- Author:
- James Kleeh, graemerocher
-
Field Summary
FieldsFields 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 Element
EMPTY_ELEMENT_ARRAYFields inherited from interface MutableAnnotationMetadataDelegate
EMPTY -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract AbstractJavaElementcopyThis()protected voidcopyValues(AbstractJavaElement element) element()booleangetDocumentation(boolean parse) getName()Returns the native underlying type.inthashCode()booleanbooleanisFinal()booleanbooleanbooleanbooleanisPublic()booleanisStatic()protected final AbstractJavaElementmakeCopy()protected final ClassElementnewClassElement(@Nullable JavaNativeElement owner, TypeMirror type, Map<String, ClassElement> declaredElementTypeArguments) Obtain the ClassElement for the given mirror.protected final ClassElementnewClassElement(@Nullable JavaNativeElement owner, TypeMirror type, Map<String, ClassElement> declaredElementTypeArguments, @Nullable String doc) Obtain the ClassElement for the given mirror.protected final ClassElementnewClassElement(TypeMirror type, Map<String, ClassElement> declaredElementTypeArguments) Obtain the ClassElement for the given mirror.protected final Map<String, ClassElement> resolveTypeArguments(ExecutableElement executableElement, Map<String, ClassElement> parentTypeArguments) protected final Map<String, ClassElement> resolveTypeArguments(TypeElement typeElement, @Nullable List<? extends TypeMirror> typeMirrorArguments) toString()withAnnotationMetadata(AnnotationMetadata annotationMetadata) Copies this element and overrides its annotations.Methods inherited from class AbstractAnnotationElement
annotate, annotate, annotate, annotate, annotate, getAnnotationMetadata, getAnnotationMetadataToWrite, getElementAnnotationMetadata, getElementAnnotationMetadataFactory, removeAnnotation, removeAnnotation, removeAnnotationIf, removeStereotype, removeStereotypeMethods inherited from interface AnnotatedElement
isDeclaredNonNull, isDeclaredNullable, isNonNull, isNullableMethods inherited from interface AnnotationMetadata
enumValuesSet, enumValuesSet, getValues, hasDeclaredStereotype, hasEvaluatedExpressions, 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, 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 Element
getDescription, getDescription, getDocumentation, getSimpleName, isSynthetic
-
Field Details
-
visitorContext
-
-
Method Details
-
element
- Specified by:
elementin interfaceElementProvider- Returns:
- The native element.
-
copyThis
- Returns:
- copy of this element
-
copyValues
- Parameters:
element- the values to be copied to
-
makeCopy
-
withAnnotationMetadata
Description copied from interface:ElementCopies this element and overrides its annotations.- Specified by:
withAnnotationMetadatain interfaceElement- Parameters:
annotationMetadata- The annotation metadata- Returns:
- A new element
-
isPackagePrivate
public boolean isPackagePrivate()- Specified by:
isPackagePrivatein interfaceElement- Returns:
- True if the element is package private.
-
getName
-
getModifiers
- Specified by:
getModifiersin interfaceElement- Returns:
- The
ElementModifiertypes for this class element
-
getDocumentation
- Specified by:
getDocumentationin interfaceElement- Parameters:
parse- True if the content should be parsed to extract documentation- Returns:
- The documentation, if any.
-
isAbstract
public boolean isAbstract()- Specified by:
isAbstractin interfaceElement- Returns:
- True if the element is abstract.
-
isStatic
-
isPublic
-
isPrivate
-
isFinal
-
isProtected
public boolean isProtected()- Specified by:
isProtectedin interfaceElement- Returns:
- True if the element is protected.
-
getNativeType
Description copied from interface:ElementReturns the native underlying type. This API is extended by all inject language implementations. The object returned by this method will be the language native type the information is being retrieved from.- Specified by:
getNativeTypein interfaceElement- Returns:
- The native type
-
toString
-
newClassElement
protected final ClassElement newClassElement(@Nullable JavaNativeElement owner, TypeMirror type, Map<String, ClassElement> declaredElementTypeArguments) Obtain the ClassElement for the given mirror.- Parameters:
owner- The ownertype- The typedeclaredElementTypeArguments- The type arguments of the declaring element (method, class)- Returns:
- The class element
-
newClassElement
protected final ClassElement newClassElement(@Nullable JavaNativeElement owner, TypeMirror type, Map<String, ClassElement> declaredElementTypeArguments, @Nullable String doc) Obtain the ClassElement for the given mirror.- Parameters:
owner- The ownertype- The typedeclaredElementTypeArguments- The type arguments of the declaring element (method, class)doc- The optional documentation- Returns:
- The class element
-
newClassElement
protected final ClassElement newClassElement(TypeMirror type, Map<String, ClassElement> declaredElementTypeArguments) Obtain the ClassElement for the given mirror.- Parameters:
type- The typedeclaredElementTypeArguments- The type arguments of the declaring element (method, class)- Returns:
- The class element
-
resolveTypeArguments
protected final Map<String, ClassElement> resolveTypeArguments(TypeElement typeElement, @Nullable List<? extends TypeMirror> typeMirrorArguments) -
resolveTypeArguments
protected final Map<String, ClassElement> resolveTypeArguments(ExecutableElement executableElement, Map<String, ClassElement> parentTypeArguments) -
equals
-
hashCode
-