public abstract class AggregateChecker extends AbstractTypeProcessor
AbstractTypeProcessor responsibilities to each
of the checkers.
Checker writers need to subclass this class and only override
getSupportedCheckers() to indicate the classes of the checkers
to be bundled.| Modifier and Type | Field and Description |
|---|---|
protected List<SourceChecker> |
checkers |
processingEnv| Constructor and Description |
|---|
AggregateChecker() |
| Modifier and Type | Method and Description |
|---|---|
Set<@ReadOnly String> |
getSupportedAnnotationTypes() |
protected abstract Collection<Class<? extends SourceChecker>> |
getSupportedCheckers()
Returns the list of supported checkers to be run together.
|
Set<@ReadOnly String> |
getSupportedOptions() |
SourceVersion |
getSupportedSourceVersion() |
void |
init(ProcessingEnvironment env)
Register a TaskListener that will get called after FLOW.
|
void |
typeProcess(TypeElement element,
@Nullable TreePath tree)
Processes a fully analyzed class that contains a supported annotation
(look
AbstractProcessor.getSupportedAnnotationTypes()). |
void |
typeProcessingOver()
A method to be called once all the classes are processed and no error
is reported.
|
void |
typeProcessingStart()
A method to be called once before the first call to typeProcess.
|
processgetCompletions, isInitialized, toStringprotected List<SourceChecker> checkers
protected abstract Collection<Class<? extends SourceChecker>> getSupportedCheckers()
public final void init(ProcessingEnvironment env)
AbstractTypeProcessorinit in interface Processorinit in class AbstractTypeProcessorpublic void typeProcessingStart()
AbstractTypeProcessorSubclasses may override this method to do any initialization work.
typeProcessingStart in class AbstractTypeProcessorpublic final void typeProcess(TypeElement element, @Nullable TreePath tree)
AbstractTypeProcessorAbstractProcessor.getSupportedAnnotationTypes()).
The passed class is always valid type-checked Java code.
typeProcess in class AbstractTypeProcessorelement - element of the analyzed classtree - the tree path to the element, with the leaf being a
ClassTreepublic void typeProcessingOver()
AbstractTypeProcessorSubclasses may override this method to do any aggregate analysis (e.g. generate report, persistence) or resource deallocation.
If an error (a Java error or a processor error) is reported, this method is not guaranteed to be invoked.
typeProcessingOver in class AbstractTypeProcessorpublic final Set<@ReadOnly String> getSupportedOptions()
getSupportedOptions in interface ProcessorgetSupportedOptions in class AbstractProcessorpublic final Set<@ReadOnly String> getSupportedAnnotationTypes()
getSupportedAnnotationTypes in interface ProcessorgetSupportedAnnotationTypes in class AbstractProcessorpublic final SourceVersion getSupportedSourceVersion()
getSupportedSourceVersion in interface ProcessorgetSupportedSourceVersion in class AbstractProcessor