@SupportedSourceVersion(value=RELEASE_8) @SupportedAnnotationTypes(value="*") @SupportedOptions(value="checker") public class SignaturePrinter extends AbstractTypeProcessor
The class determines the effective annotations for a checker in source or the classfile. Finding the effective annotations is useful for the following purposes:
The class can be used in two possible ways, depending on the type file:
javac -processor SignaturePrinter <java files> ...
java SignaturePrinter <class name>
-Achecker= argument, e.g.
javac -processor SignaturePrinter
-Achecker=org.checkerframework.checker.nullness.NullnessChecker JavaFile.java
processingEnv| Constructor and Description |
|---|
SignaturePrinter() |
| Modifier and Type | Method and Description |
|---|---|
static void |
main(String[] args) |
static void |
printUsage() |
void |
typeProcess(TypeElement element,
TreePath p)
Processes a fully-analyzed class that contains a supported annotation (see
AbstractProcessor.getSupportedAnnotationTypes()). |
void |
typeProcessingStart()
A method to be called once before the first call to typeProcess.
|
getCompilerLog, init, process, typeProcessingOvergetCompletions, getSupportedAnnotationTypes, getSupportedOptions, getSupportedSourceVersion, isInitializedpublic void typeProcessingStart()
AbstractTypeProcessorSubclasses may override this method to do any initialization work.
typeProcessingStart in class AbstractTypeProcessorpublic void typeProcess(TypeElement element, TreePath p)
AbstractTypeProcessorAbstractProcessor.getSupportedAnnotationTypes()).
The passed class is always valid type-checked Java code.
typeProcess in class AbstractTypeProcessorelement - element of the analyzed classp - the tree path to the element, with the leaf being a ClassTreepublic static void printUsage()
public static void main(String[] args)