@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>
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.
|
init, process, typeProcessingOver
getCompletions, getSupportedAnnotationTypes, getSupportedOptions, getSupportedSourceVersion, isInitialized
public void typeProcessingStart()
AbstractTypeProcessor
Subclasses may override this method to do any initialization work.
typeProcessingStart
in class AbstractTypeProcessor
public void typeProcess(TypeElement element, TreePath p)
AbstractTypeProcessor
AbstractProcessor.getSupportedAnnotationTypes()
).
The passed class is always valid type-checked Java code.
typeProcess
in class AbstractTypeProcessor
element
- element of the analyzed classp
- the tree path to the element, with the leaf being a
ClassTree
public static void printUsage()
public static void main(String[] args)