checkers.util.count
Class AnnotationsCounter

java.lang.Object
  extended by javax.annotation.processing.AbstractProcessor
      extended by checkers.util.count.AnnotationsCounter
All Implemented Interfaces:
Processor

@SupportedAnnotationTypes(value="*")
@SupportedSourceVersion(value=RELEASE_7)
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
processingEnv
 
Constructor Summary
Constructor and Description
AnnotationsCounter()
           
 
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

AnnotationsCounter

public AnnotationsCounter()
Method Detail

incrementCount

protected void incrementCount(Name annoName)

process

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