Class SignaturePrinter
java.lang.Object
javax.annotation.processing.AbstractProcessor
org.checkerframework.javacutil.AbstractTypeProcessor
org.checkerframework.common.util.debug.SignaturePrinter
- All Implemented Interfaces:
- Processor
@SupportedSourceVersion(RELEASE_8)
@SupportedAnnotationTypes("*")
@SupportedOptions("checker")
public class SignaturePrinter
extends AbstractTypeProcessor
Outputs the method signatures of a class with fully annotated types.
 
The class determines the effective annotations for a checker in source or the classfile. Finding the effective annotations is useful for the following purposes:
- Debugging annotations in classfile
- Debugging the default annotations that are implicitly added by the checker
The class can be used in two possible ways, depending on the type file:
- From source: the class is to be used as an annotation processor when reading
       annotations from source. It can be invoked via the command:
       javac -processor SignaturePrinter <java files> ...
- From classfile: the class is to be used as an independent app when reading
       annotations from classfile. It can be invoked via the command:
       java SignaturePrinter <class name>
-Achecker= argument, e.g.
 
 javac -processor SignaturePrinter
       -Achecker=org.checkerframework.checker.nullness.NullnessChecker JavaFile.java
 - 
Field SummaryFields inherited from class javax.annotation.processing.AbstractProcessorprocessingEnv
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidstatic voidvoidtypeProcess(TypeElement element, TreePath p) Processes a fully-analyzed class that contains a supported annotation (seeAbstractProcessor.getSupportedAnnotationTypes()).voidA method to be called once before the first call to typeProcess.Methods inherited from class org.checkerframework.javacutil.AbstractTypeProcessorgetCompilerLog, init, process, typeProcessingOverMethods inherited from class javax.annotation.processing.AbstractProcessorgetCompletions, getSupportedAnnotationTypes, getSupportedOptions, getSupportedSourceVersion, isInitialized
- 
Constructor Details- 
SignaturePrinterpublic SignaturePrinter()
 
- 
- 
Method Details- 
typeProcessingStartpublic void typeProcessingStart()Description copied from class:AbstractTypeProcessorA method to be called once before the first call to typeProcess.Subclasses may override this method to do any initialization work. - Overrides:
- typeProcessingStartin class- AbstractTypeProcessor
 
- 
typeProcessDescription copied from class:AbstractTypeProcessorProcesses a fully-analyzed class that contains a supported annotation (seeAbstractProcessor.getSupportedAnnotationTypes()).The passed class is always valid type-checked Java code. - Specified by:
- typeProcessin class- AbstractTypeProcessor
- Parameters:
- element- element of the analyzed class
- p- the tree path to the element, with the leaf being a- ClassTree
 
- 
printUsagepublic static void printUsage()
- 
main
 
-