Package org.checkerframework.afu.scenelib
package org.checkerframework.afu.scenelib
The Annotation Scene Library provides classes to represent the annotations on a Java program and
read and write those annotations in various formats.
Structure
- An
AScene
holds annotations for a set of classes and packages. - A
AElement
represents one particular element of a Java program within anAScene
. - Package
org.checkerframework.afu.scenelib.io
provides routines to read and writeAScene
s in various formats. - An
Annotation
represents an annotation (which might be a field of another annotation). It can be attached to anAElement
. - An
AnnotationDef
represents an annotation definition, consisting of a definition name and field names and types (AnnotationFieldType
s). It also indicates the annotation's retention policy.
Example
The example program annotations.tests.Example
demonstrates the library's
annotation-processing capabilities. Its source code (and also example input and output) are
distributed with the Annotation Scene Library.
-
ClassDescriptionA very simple annotation representation constructed with a map of field names to values.An
AnnotationBuilder
builds a single annotation object after the annotation's fields have been supplied one by one.A very simpleAnnotationFactory
that createsAnnotation
s.This noninstantiable class provides useful static methods related to annotations, following the convention ofCollections
.Builds an array that will serve as a field of an annotation; created byAnnotationBuilder.beginArrayField(java.lang.String, org.checkerframework.afu.scenelib.field.ArrayAFT)
.