public abstract class AbstractJavaElement extends java.lang.Object implements Element, AnnotationMetadataDelegate
EMPTY_ELEMENT_ARRAYCLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBEREMPTY| Modifier and Type | Method and Description |
|---|---|
<T extends java.lang.annotation.Annotation> |
annotate(java.lang.String annotationType,
java.util.function.Consumer<AnnotationValueBuilder<T>> consumer)
Annotate this element with the given annotation type.
|
AnnotationMetadata |
getAnnotationMetadata()
Supplies the metadata.
|
java.lang.String |
getName() |
java.lang.Object |
getNativeType()
Returns the native underlying type.
|
boolean |
isAbstract() |
boolean |
isFinal() |
boolean |
isPrivate() |
boolean |
isProtected() |
boolean |
isPublic() |
boolean |
isStatic() |
protected ClassElement |
mirrorToClassElement(javax.lang.model.type.TypeMirror returnType,
JavaVisitorContext visitorContext)
Obtain the ClassElement for the given mirror.
|
protected ClassElement |
mirrorToClassElement(javax.lang.model.type.TypeMirror returnType,
JavaVisitorContext visitorContext,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,javax.lang.model.type.TypeMirror>> genericsInfo)
Obtain the ClassElement for the given mirror.
|
protected ClassElement |
parameterizedClassElement(javax.lang.model.type.TypeMirror typeMirror,
JavaVisitorContext visitorContext,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,javax.lang.model.type.TypeMirror>> declaredGenericInfo)
Returns a class element with aligned generic information.
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitannotate, annotate, annotate, getDocumentation, getSimpleNamebooleanValue, 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, getAnnotation, getAnnotation, getAnnotationNameByStereotype, getAnnotationNameByStereotype, getAnnotationNames, getAnnotationNamesByStereotype, getAnnotationNamesByStereotype, getAnnotationType, getAnnotationType, getAnnotationTypeByStereotype, getAnnotationTypeByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationValuesByType, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationValuesByType, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValues, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValues, getValues, hasAnnotation, hasAnnotation, hasDeclaredAnnotation, hasDeclaredAnnotation, hasDeclaredStereotype, hasDeclaredStereotype, hasDeclaredStereotype, hasSimpleAnnotation, hasSimpleDeclaredAnnotation, hasStereotype, hasStereotype, hasStereotype, hasStereotype, intValue, intValue, intValue, isAnnotationPresent, isDeclaredAnnotationPresent, isEmpty, isFalse, isFalse, isPresent, isPresent, isTrue, isTrue, longValue, longValue, stringValue, stringValue, stringValue, stringValue, stringValues, stringValues, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByTypeisDeclaredNonNull, isDeclaredNullable, isNonNull, isNullable@NonNull public <T extends java.lang.annotation.Annotation> Element annotate(@NonNull java.lang.String annotationType, @NonNull java.util.function.Consumer<AnnotationValueBuilder<T>> consumer)
Elementannotate in interface ElementT - The annotation generic typeannotationType - The annotation typeconsumer - A function that receives the AnnotationValueBuilderpublic java.lang.String getName()
public boolean isAbstract()
isAbstract in interface Elementpublic boolean isStatic()
public boolean isPublic()
public boolean isPrivate()
public boolean isFinal()
public boolean isProtected()
isProtected in interface Elementpublic java.lang.Object getNativeType()
ElementgetNativeType in interface Elementpublic AnnotationMetadata getAnnotationMetadata()
AnnotationMetadataProviderAnnotationMetadata.EMPTY_METADATA.getAnnotationMetadata in interface AnnotationMetadataProviderAnnotationMetadatapublic java.lang.String toString()
toString in class java.lang.Object@NonNull protected ClassElement parameterizedClassElement(javax.lang.model.type.TypeMirror typeMirror, JavaVisitorContext visitorContext, java.util.Map<java.lang.String,java.util.Map<java.lang.String,javax.lang.model.type.TypeMirror>> declaredGenericInfo)
typeMirror - The type mirrorvisitorContext - The visitor contextdeclaredGenericInfo - The declared generic info@NonNull protected ClassElement mirrorToClassElement(javax.lang.model.type.TypeMirror returnType, JavaVisitorContext visitorContext)
returnType - The return typevisitorContext - The visitor context@NonNull protected ClassElement mirrorToClassElement(javax.lang.model.type.TypeMirror returnType, JavaVisitorContext visitorContext, java.util.Map<java.lang.String,java.util.Map<java.lang.String,javax.lang.model.type.TypeMirror>> genericsInfo)
returnType - The return typevisitorContext - The visitor contextgenericsInfo - The generic informatino