Class AnnotationsCounter

  extended by javax.annotation.processing.AbstractProcessor
      extended by checkers.util.count.AnnotationsCounter
All Implemented Interfaces:

public class AnnotationsCounter
extends AbstractProcessor

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. (But, in general -proc:only causes type annotation processors not te be run.)

Field Summary
Modifier and Type Field and Description
Fields inherited from class javax.annotation.processing.AbstractProcessor
Constructor Summary
Constructor and Description
Method Summary
Modifier and Type Method and Description
protected  void incrementCount(Name annoName)
 boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv)
Methods inherited from class javax.annotation.processing.AbstractProcessor
getCompletions, getSupportedAnnotationTypes, getSupportedOptions, getSupportedSourceVersion, init, isInitialized
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public AnnotationsCounter()
Method Detail


protected void incrementCount(Name annoName)


public boolean process(Set<? extends TypeElement> annotations,
                       RoundEnvironment roundEnv)
Specified by:
process in interface Processor
Specified by:
process in class AbstractProcessor