Class AnnotationConverter
java.lang.Object
org.checkerframework.common.wholeprograminference.AnnotationConverter
This class contains static methods that convert between 
Annotation and AnnotationMirror.- 
Method SummaryModifier and TypeMethodDescriptionprotected static voidaddFieldToAnnotationBuilder(String fieldKey, Object obj, AnnotationBuilder builder) Adds a field to an AnnotationBuilder.static org.checkerframework.afu.scenelib.AnnotationConverts anAnnotationMirrorinto anAnnotation.protected static AnnotationMirrorannotationToAnnotationMirror(org.checkerframework.afu.scenelib.Annotation anno, ProcessingEnvironment processingEnv) Converts anAnnotationinto anAnnotationMirror.protected static @Nullable org.checkerframework.afu.scenelib.field.AnnotationFieldTypeReturns the type of an element (that is, a field) of an annotation.protected static org.checkerframework.afu.scenelib.field.AnnotationFieldTypeConverts a TypeMirror to an AnnotationFieldType.
- 
Method Details- 
annotationMirrorToAnnotationpublic static org.checkerframework.afu.scenelib.Annotation annotationMirrorToAnnotation(AnnotationMirror am) Converts anAnnotationMirrorinto anAnnotation.- Parameters:
- am- the AnnotationMirror
- Returns:
- the Annotation
 
- 
annotationToAnnotationMirrorprotected static AnnotationMirror annotationToAnnotationMirror(org.checkerframework.afu.scenelib.Annotation anno, ProcessingEnvironment processingEnv) Converts anAnnotationinto anAnnotationMirror.- Parameters:
- anno- the Annotation
- processingEnv- the ProcessingEnvironment
- Returns:
- the AnnotationMirror
 
- 
getAnnotationFieldTypeprotected static @Nullable org.checkerframework.afu.scenelib.field.AnnotationFieldType getAnnotationFieldType(ExecutableElement ee) Returns the type of an element (that is, a field) of an annotation.- Parameters:
- ee- an element (that is, a field) of an annotation
- Returns:
- the type of the given annotation field
 
- 
typeMirrorToAnnotationFieldTypeprotected static org.checkerframework.afu.scenelib.field.AnnotationFieldType typeMirrorToAnnotationFieldType(TypeMirror tm) Converts a TypeMirror to an AnnotationFieldType.- Parameters:
- tm- a type for an annotation element/field: primitive, String, class, enum constant, or array thereof
- Returns:
- an AnnotationFieldType corresponding to the argument
 
- 
addFieldToAnnotationBuilderprotected static void addFieldToAnnotationBuilder(String fieldKey, Object obj, AnnotationBuilder builder) Adds a field to an AnnotationBuilder.- Parameters:
- fieldKey- is the name of the field
- obj- is the value of the field
- builder- is the AnnotationBuilder
 
 
-