@SupportedSourceVersion(value=RELEASE_8) public class JavaCodeStatistics extends SourceChecker
To invoke it, use
javac -proc:only -processor org.checkerframework.common.util.count.JavaCodeStatistics MyFile.java ...
AnnotationStatistics
currentRoot, DETAILS_SEPARATOR, elementsWithSuppressedWarnings, errsOnLastExit, messager, messagesProperties, MSGS_FILE, OPTION_SEPARATOR, parentChecker, SUPPRESS_ALL_MESSAGE_KEY, SUPPRESS_ALL_PREFIX, trees, UNNEEDED_SUPPRESSION_KEY, upstreamCheckerNames, visitor
processingEnv
Constructor and Description |
---|
JavaCodeStatistics() |
Modifier and Type | Method and Description |
---|---|
protected SourceVisitor<?,?> |
createSourceVisitor()
Provides the
SourceVisitor that the checker should use to scan input source trees. |
AnnotationProvider |
getAnnotationProvider() |
void |
typeProcessingOver()
A method to be called once all the classes are processed and no error is reported.
|
addOptions, createSupportedLintOptions, expandCFOptions, fullMessageOf, getBooleanOption, getBooleanOption, getChecker, getContext, getElementUtils, getLintOption, getLintOption, getMessagesProperties, getOption, getOption, getOptionConfiguration, getOptions, getParentChecker, getProcessingEnvironment, getProperties, getStandardSuppressWarningsPrefixes, getSupportedAnnotationTypes, getSupportedLintOptions, getSupportedOptions, getSupportedSourceVersion, getSuppressWarningsPrefixes, getTreeUtils, getTypeUtils, getUpstreamCheckerNames, getVisitor, hasOption, init, initChecker, message, printOrStoreMessage, printOrStoreMessage, printStats, processArg, report, reportError, reportWarning, setLintOption, setParentChecker, setProcessingEnvironment, setRoot, setSupportedLintOptions, shouldAddShutdownHook, shouldSkipDefs, shouldSkipDefs, shouldSkipUses, shouldSkipUses, shouldSuppressWarnings, shouldSuppressWarnings, shutdownHook, typeProcess, typeProcessingStart, useConservativeDefault, warnUnneededSuppressions, warnUnneededSuppressions
getCompilerLog, process
getCompletions, isInitialized
public void typeProcessingOver()
AbstractTypeProcessor
Subclasses may override this method to do any aggregate analysis (e.g. generate report, persistence) or resource deallocation.
Method AbstractTypeProcessor.getCompilerLog()
can be used to access the number of compiler errors.
typeProcessingOver
in class AbstractTypeProcessor
protected SourceVisitor<?,?> createSourceVisitor()
SourceChecker
SourceVisitor
that the checker should use to scan input source trees.createSourceVisitor
in class SourceChecker
SourceVisitor
to use to scan source treespublic AnnotationProvider getAnnotationProvider()
getAnnotationProvider
in interface BaseContext
getAnnotationProvider
in class SourceChecker