Class DefCollector
java.lang.Object
org.checkerframework.afu.scenelib.el.DefCollector
A DefCollector supplies a visitor for the annotation definitions in an AScene. First, call the
DefCollector constructor passing the AScene. Then, call the visit method. This class exists
primarily for the benefit of
IndexFileWriter.write(AScene, Writer)
.-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newDefCollector
, which immediately collects all the definitions from annotations the given scene. -
Method Summary
Modifier and TypeMethodDescriptionfinal void
visit()
CallsvisitAnnotationDef(org.checkerframework.afu.scenelib.el.AnnotationDef)
on the definitions collected from the scene that was passed to the constructor.protected abstract void
Override this method to perform some sort of subclass-specific processing on the givenAnnotationDef
.
-
Constructor Details
-
DefCollector
Constructs a newDefCollector
, which immediately collects all the definitions from annotations the given scene. Next callvisit()
to have the definitions passed back to you in topological order. If the scene contains two irreconcilable definitions of the same annotation type, aDefException
is thrown.- Throws:
DefException
-
-
Method Details
-
visitAnnotationDef
Override this method to perform some sort of subclass-specific processing on the givenAnnotationDef
.It is only called once per annotation used in the scene, because each annotation is only defined once.
-
visit
public final void visit()CallsvisitAnnotationDef(org.checkerframework.afu.scenelib.el.AnnotationDef)
on the definitions collected from the scene that was passed to the constructor. Visiting is done in topological order: if the definition ofA
contains a subannotation of typeB
, thenB
is guaranteed to be visited beforeA
.
-