public final class BasicChecker extends BaseTypeChecker
The annotation(s) are specified on the command line, using an annotation processor argument:
-Aquals
: specifies the annotations in the qualifier hierarchy
(as a comma-separated list of fully-qualified annotation names with no
spaces in between). Only the annotation for one qualified subtype
hierarchy can be passed.SourceChecker.CheckerError
currentPath, currentRoot, messager, messages, trees
processingEnv
Constructor and Description |
---|
BasicChecker() |
Modifier and Type | Method and Description |
---|---|
AnnotatedTypeFactory |
createFactory(@Nullable CompilationUnitTree root)
Constructs an instance of the appropriate type factory for the
implemented type system.
|
protected Set<Class<? extends Annotation>> |
createSupportedTypeQualifiers()
If the checker class is annotated with
TypeQualifiers , return an immutable set with the same set
of classes as the annotation. |
Collection<@ReadOnly String> |
getSuppressWarningsKey() |
createQualifierHierarchy, createQualifierHierarchy, createQualifierHierarchyFactory, createSourceVisitor, createTypeHierarchy, getQualifierHierarchy, getSupportedLintOptions, getSupportedTypeQualifiers, getTypeHierarchy, initChecker, invokeConstructorFor
errorAbort, errorAbort, formatStackTrace, fullMessageOf, getLintOption, getLintOption, getMessages, getProcessingEnvironment, getProperties, getSupportedAnnotationTypes, getSupportedOptions, getSupportedSourceVersion, message, report, shouldSkipDefs, shouldSkipDefs, shouldSkipUses, typeProcess, typeProcessingStart
init, process, typeProcessingOver
getCompletions, isInitialized, toString
public AnnotatedTypeFactory createFactory(@Nullable CompilationUnitTree root)
BaseTypeChecker
BasicAnnotatedTypeFactory
. It reflectively invokes the
constructor that accepts this checker and compilation unit tree
(in that order) as arguments.
Subclasses have to override this method to create the appropriate
visitor if they do not follow the checker naming convention.createFactory
in class BaseTypeChecker
root
- the currently visited compilation unitprotected Set<Class<? extends Annotation>> createSupportedTypeQualifiers()
BaseTypeChecker
TypeQualifiers
, return an immutable set with the same set
of classes as the annotation. If the class is not so annotated,
return an empty set.
Subclasses may override this method to return an immutable set
of their supported type qualifiers.createSupportedTypeQualifiers
in class BaseTypeChecker
TypeQualifiers
public Collection<@ReadOnly String> getSuppressWarningsKey()
getSuppressWarningsKey
in class SourceChecker
SuppressWarningsKey