public abstract class AbstractJavaElement extends Object implements Element, AnnotationMetadataDelegate
CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBER
EMPTY
Modifier and Type | Method and Description |
---|---|
<T extends Annotation> |
annotate(String annotationType,
Consumer<AnnotationValueBuilder<T>> consumer)
Annotate this element with the given annotation type.
|
AnnotationMetadata |
getAnnotationMetadata()
Supplies the metadata.
|
String |
getName() |
Object |
getNativeType()
Returns the native underlying type.
|
boolean |
isAbstract() |
boolean |
isFinal() |
boolean |
isPrivate() |
boolean |
isProtected() |
boolean |
isPublic() |
boolean |
isStatic() |
protected ClassElement |
mirrorToClassElement(TypeMirror returnType,
JavaVisitorContext visitorContext)
Obtain the ClassElement for the given mirror.
|
protected ClassElement |
mirrorToClassElement(TypeMirror returnType,
JavaVisitorContext visitorContext,
Map<String,Map<String,TypeMirror>> genericsInfo)
Obtain the ClassElement for the given mirror.
|
protected ClassElement |
parameterizedClassElement(TypeMirror typeMirror,
JavaVisitorContext visitorContext,
Map<String,Map<String,TypeMirror>> declaredGenericInfo)
Returns a class element with aligned generic information.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
annotate, annotate, annotate, getDocumentation, getSimpleName
booleanValue, booleanValue, booleanValue, booleanValue, classValue, classValue, classValue, classValue, classValues, classValues, classValues, classValues, doubleValue, doubleValue, doubleValue, enumValue, enumValue, enumValue, enumValue, findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotation, getAnnotation, getAnnotationNameByStereotype, getAnnotationNameByStereotype, getAnnotationNames, getAnnotationNamesByStereotype, getAnnotationNamesByStereotype, getAnnotationType, getAnnotationTypeByStereotype, getAnnotationTypeByStereotype, getAnnotationTypesByStereotype, getAnnotationValuesByType, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationValuesByType, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValues, getValues, hasAnnotation, hasAnnotation, hasDeclaredAnnotation, hasDeclaredAnnotation, hasDeclaredStereotype, hasDeclaredStereotype, hasDeclaredStereotype, 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, synthesizeDeclaredAnnotationsByType
@Nonnull public <T extends Annotation> Element annotate(@Nonnull String annotationType, @Nonnull Consumer<AnnotationValueBuilder<T>> consumer)
Element
annotate
in interface Element
T
- The annotation generic typeannotationType
- The annotation typeconsumer
- A function that receives the AnnotationValueBuilder
public String getName()
public boolean isAbstract()
isAbstract
in interface Element
public boolean isStatic()
public boolean isPublic()
public boolean isPrivate()
public boolean isFinal()
public boolean isProtected()
isProtected
in interface Element
public Object getNativeType()
Element
getNativeType
in interface Element
public AnnotationMetadata getAnnotationMetadata()
AnnotationMetadataProvider
AnnotationMetadata.EMPTY_METADATA
.getAnnotationMetadata
in interface AnnotationMetadataProvider
AnnotationMetadata
@Nonnull protected ClassElement parameterizedClassElement(TypeMirror typeMirror, JavaVisitorContext visitorContext, Map<String,Map<String,TypeMirror>> declaredGenericInfo)
typeMirror
- The type mirrorvisitorContext
- The visitor contextdeclaredGenericInfo
- The declared generic info@Nonnull protected ClassElement mirrorToClassElement(TypeMirror returnType, JavaVisitorContext visitorContext)
returnType
- The return typevisitorContext
- The visitor context@Nonnull protected ClassElement mirrorToClassElement(TypeMirror returnType, JavaVisitorContext visitorContext, Map<String,Map<String,TypeMirror>> genericsInfo)
returnType
- The return typevisitorContext
- The visitor contextgenericsInfo
- The generic informatino