public class FenumChecker extends BaseTypeChecker
@Fenum("Name")
: introduces a fake enumerator with the name
"Name". Enumerators with different names are distinct. The default name is
empty, but you are encouraged to use a unique name for your purpose.
-Aqual
command line argument.
Modifier and Type | Class and Description |
---|---|
protected class |
FenumChecker.FenumQualifierHierarchy |
SourceChecker.CheckerError
Modifier and Type | Field and Description |
---|---|
protected @Nullable AnnotationMirror |
BOTTOM |
protected @Nullable AnnotationMirror |
FENUM |
currentPath, currentRoot, env, messager, messages, trees
processingEnv
Constructor and Description |
---|
FenumChecker() |
Modifier and Type | Method and Description |
---|---|
protected @Nullable QualifierHierarchy |
createQualifierHierarchy()
Returns the type qualifier hierarchy graph to be used by this processor.
|
protected GraphQualifierHierarchy.GraphFactory |
createQualifierHierarchyFactory()
Factory method to easily change what Factory is used to
create a QualifierHierarchy.
|
protected Set<Class<? extends Annotation>> |
createSupportedTypeQualifiers()
Copied from BasicChecker.
|
Collection<@ReadOnly String> |
getSuppressWarningsKey()
Copied from BasicChecker; cannot reuse it, because BasicChecker is final.
|
void |
initChecker(ProcessingEnvironment env)
Initialize the checker.
|
createFactory, createSourceVisitor, createTypeHierarchy, getQualifierHierarchy, getSupportedLintOptions, getSupportedTypeQualifiers, invokeConstructorFor, isAssignable, isSubtype
errorAbort, errorAbort, formatStackTrace, fullMessageOf, getLintOption, getLintOption, getMessages, getProcessingEnvironment, getSupportedAnnotationTypes, getSupportedOptions, getSupportedSourceVersion, init, message, report, shouldSkipDefs, shouldSkipDefs, shouldSkipUses, typeProcess
process, typeProcessingOver
getCompletions, isInitialized, toString
protected @Nullable AnnotationMirror FENUM
protected @Nullable AnnotationMirror BOTTOM
public void initChecker(ProcessingEnvironment env)
SourceChecker
initChecker
in class BaseTypeChecker
AbstractProcessor.init(ProcessingEnvironment)
protected Set<Class<? extends Annotation>> createSupportedTypeQualifiers()
createSupportedTypeQualifiers
in class BaseTypeChecker
TypeQualifiers
public Collection<@ReadOnly String> getSuppressWarningsKey()
getSuppressWarningsKey
in class SourceChecker
SuppressWarningsKey
protected GraphQualifierHierarchy.GraphFactory createQualifierHierarchyFactory()
BaseTypeChecker
createQualifierHierarchyFactory
in class BaseTypeChecker
protected @Nullable QualifierHierarchy createQualifierHierarchy()
BaseTypeChecker
BaseTypeChecker.getSupportedTypeQualifiers()
using the
meta-annotations found in them. The current implementation returns an
instance of GraphQualifierHierarchy
.
Subclasses may override this method to express any relationships that
cannot be inferred using meta-annotations (e.g. due to lack of
meta-annotations).createQualifierHierarchy
in class BaseTypeChecker