checkers.util.count
Class AnnotationsCounter
java.lang.Object
   javax.annotation.processing.AbstractProcessor
javax.annotation.processing.AbstractProcessor
       checkers.source.SourceChecker
checkers.source.SourceChecker
           checkers.util.count.AnnotationsCounter
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
- Type-check the code with Java specifications and then runs the Checker
 Rule Checking visitor on the processed source.
 The Processoris invoked in the annotation processing phase,
 before the code is type-checked by the compiler.  This method ensures
 that only Java valid code is processed by the Rule Checking visitor.
 
- 
- Specified by:
- processin interface- Processor
- Overrides:
- processin class- SourceChecker
 
- 
- See Also:
- Processor.process(Set, RoundEnvironment)
 
createSourceVisitor
protected SourceVisitor<?,?> createSourceVisitor(CompilationUnitTree root)
- Description copied from class: SourceChecker
- Provides the SourceVisitorthat the checker should use to scan
 input source trees.
 
- 
- Specified by:
- createSourceVisitorin class- SourceChecker
 
- 
- Parameters:
- root- the AST root
- Returns:
- a SourceVisitorto use to scan source trees
 
attribute
protected boolean attribute(Set<? extends TypeElement> elements)
- No need for type-checking.  Elemenates need for setting all classpaths
 
- 
- Overrides:
- attributein class- SourceChecker
 
- 
- Returns:
- true iff if the code type-checks with Java Specification