@SupportedOptions(value={"nolocations","annotations"}) @SupportedSourceVersion(value=RELEASE_8) public class Locations extends SourceChecker
javac -proc:only -processor org.checkerframework.common.util.count.Locations MyFile.java ...
You probably want to pipe the output through another program:
... | wc.
... | sort | uniq -c
grep
By default, this utility displays annotation locations only. The following two options may be used to adjust the output:
-Aannotations: prints, on the same line as each location, information about the
annotation that is written there, if any
-Anolocations: suppresses location output; only makes sense in conjunction with
-Aannotations
SourceChecker.CheckerErrorcurrentRoot, DETAILS_SEPARATOR, errsOnLastExit, messager, messages, MSGS_FILE, parentChecker, SUPPRESS_ALL_KEY, trees, upstreamCheckerNames, visitorprocessingEnv| Constructor and Description |
|---|
Locations() |
| Modifier and Type | Method and Description |
|---|---|
protected SourceVisitor<?,?> |
createSourceVisitor()
Provides the
SourceVisitor that the checker should use to scan input source trees. |
AnnotationProvider |
getAnnotationProvider() |
addOptions, createSupportedLintOptions, errorAbort, errorAbort, expandCFOptions, formatStackTrace, fullMessageOf, getChecker, getContext, getElementUtils, getLintOption, getLintOption, getMessages, getOption, getOption, getOptionConfiguration, getOptions, getProcessingEnvironment, getProperties, getStandardSuppressWarningsKeys, getSupportedAnnotationTypes, getSupportedLintOptions, getSupportedOptions, getSupportedSourceVersion, getSuppressWarningsKeys, getTreeUtils, getTypeUtils, getUpstreamCheckerNames, getVisitor, hasOption, init, initChecker, message, printMessage, printStats, processArg, report, setLintOption, setParentChecker, setProcessingEnvironment, setSupportedLintOptions, shouldAddShutdownHook, shouldSkipDefs, shouldSkipDefs, shouldSkipUses, shouldSkipUses, shouldSuppressWarnings, shouldSuppressWarnings, shutdownHook, treeToFilePositionString, typeProcess, typeProcessingStart, userErrorAbort, useUncheckedCodeDefaultprocess, typeProcessingOvergetCompletions, isInitializedprotected SourceVisitor<?,?> createSourceVisitor()
SourceCheckerSourceVisitor that the checker should use to scan input source trees.createSourceVisitor in class SourceCheckerSourceVisitor to use to scan source treespublic AnnotationProvider getAnnotationProvider()
getAnnotationProvider in interface BaseContextgetAnnotationProvider in class SourceChecker