checkers.util.count
Class AnnotationsCounter
java.lang.Object
javax.annotation.processing.AbstractProcessor
checkers.source.SourceChecker
checkers.util.count.AnnotationsCounter
- All Implemented Interfaces:
- Processor
public class AnnotationsCounter
- extends SourceChecker
A utility class for counting the occurrences of annotations
The class is actually an annotation processor; in order to use it, invoke
the compiler on the source file(s) for which you wish to count annotations
locations. You may also wish to use the -proc:only
javac option to
stop compilation after annotation processing.
Methods inherited from class checkers.source.SourceChecker |
createFactory, getLintOption, getLintOption, getMessages, getProcessingEnvironment, getShouldSkip, getSupportedAnnotationTypes, getSupportedLintOptions, getSupportedOptions, getSupportedSourceVersion, getSuppressWarningsKey, init, message, report, shouldSkip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AnnotationsCounter
public AnnotationsCounter()
incrementCount
protected void incrementCount(Name annoName)
process
public boolean process(Set<? extends TypeElement> annotations,
RoundEnvironment roundEnv)
- Description copied from class:
SourceChecker
-
- Specified by:
process
in interface Processor
- Overrides:
process
in class SourceChecker
- See Also:
AbstractProcessor.process(java.util.Set,
javax.annotation.processing.RoundEnvironment)
createSourceVisitor
protected SourceVisitor<?,?> createSourceVisitor(CompilationUnitTree root)
- Description copied from class:
SourceChecker
- Provides the
SourceVisitor
that the checker should use to scan
input source trees.
- Specified by:
createSourceVisitor
in class SourceChecker
- Parameters:
root
- the AST root
- Returns:
- a
SourceVisitor
to use to scan source trees