public class AnnotationConverter extends Object
Annotation
and AnnotationMirror
.Modifier and Type | Method and Description |
---|---|
protected static void |
addFieldToAnnotationBuilder(String fieldKey,
Object obj,
AnnotationBuilder builder)
Adds a field to an AnnotationBuilder.
|
static org.checkerframework.afu.scenelib.Annotation |
annotationMirrorToAnnotation(AnnotationMirror am)
Converts an
AnnotationMirror into an Annotation . |
protected static AnnotationMirror |
annotationToAnnotationMirror(org.checkerframework.afu.scenelib.Annotation anno,
ProcessingEnvironment processingEnv)
Converts an
Annotation into an AnnotationMirror . |
protected static @Nullable org.checkerframework.afu.scenelib.field.AnnotationFieldType |
getAnnotationFieldType(ExecutableElement ee)
Returns the type of an element (that is, a field) of an annotation.
|
protected static org.checkerframework.afu.scenelib.field.AnnotationFieldType |
typeMirrorToAnnotationFieldType(TypeMirror tm)
Converts a TypeMirror to an AnnotationFieldType.
|
public static org.checkerframework.afu.scenelib.Annotation annotationMirrorToAnnotation(AnnotationMirror am)
AnnotationMirror
into an Annotation
.am
- the AnnotationMirrorprotected static AnnotationMirror annotationToAnnotationMirror(org.checkerframework.afu.scenelib.Annotation anno, ProcessingEnvironment processingEnv)
Annotation
into an AnnotationMirror
.anno
- the AnnotationprocessingEnv
- the ProcessingEnvironmentprotected static @Nullable org.checkerframework.afu.scenelib.field.AnnotationFieldType getAnnotationFieldType(ExecutableElement ee)
ee
- an element (that is, a field) of an annotationprotected static org.checkerframework.afu.scenelib.field.AnnotationFieldType typeMirrorToAnnotationFieldType(TypeMirror tm)
tm
- a type for an annotation element/field: primitive, String, class, enum constant, or
array thereofprotected static void addFieldToAnnotationBuilder(String fieldKey, Object obj, AnnotationBuilder builder)
fieldKey
- is the name of the fieldobj
- is the value of the fieldbuilder
- is the AnnotationBuilder