public class ImmutabilitySubchecker extends BaseTypeChecker
SourceChecker.CheckerError
Modifier and Type | Field and Description |
---|---|
protected @Nullable AnnotationMirror |
ASSIGNS_FIELDS
Supported annotations for IGJ.
|
protected @Nullable AnnotationMirror |
BOTTOM_QUAL
Supported annotations for IGJ.
|
protected @Nullable AnnotationMirror |
I
Supported annotations for IGJ.
|
protected @Nullable AnnotationMirror |
IMMUTABLE
Supported annotations for IGJ.
|
protected @Nullable AnnotationMirror |
MUTABLE
Supported annotations for IGJ.
|
protected @Nullable AnnotationMirror |
READONLY
Supported annotations for IGJ.
|
currentPath, currentRoot, env, messager, messages, trees
processingEnv
Constructor and Description |
---|
ImmutabilitySubchecker() |
Modifier and Type | Method and Description |
---|---|
protected TypeHierarchy |
createTypeHierarchy()
Creates the type subtyping checker using the current type qualifier
hierarchy.
|
void |
initChecker(ProcessingEnvironment env)
Initialize the checker.
|
boolean |
isAssignable(@Mutable AnnotatedTypeMirror varType,
@Mutable AnnotatedTypeMirror receiverType,
@Nullable Tree varTree,
AnnotatedTypeFactory factory)
Tests whether the variable accessed is an assignable variable or not,
given the current scope
TODO: document which parameters are nullable; e.g.
|
createFactory, createQualifierHierarchy, createQualifierHierarchyFactory, createSourceVisitor, createSupportedTypeQualifiers, getQualifierHierarchy, getSupportedLintOptions, getSupportedTypeQualifiers, invokeConstructorFor, isSubtype
errorAbort, errorAbort, formatStackTrace, fullMessageOf, getLintOption, getLintOption, getMessages, getProcessingEnvironment, getSupportedAnnotationTypes, getSupportedOptions, getSupportedSourceVersion, getSuppressWarningsKey, init, message, report, shouldSkipDefs, shouldSkipDefs, shouldSkipUses, typeProcess
process, typeProcessingOver
getCompletions, isInitialized, toString
protected @Nullable AnnotationMirror READONLY
protected @Nullable AnnotationMirror MUTABLE
protected @Nullable AnnotationMirror IMMUTABLE
protected @Nullable AnnotationMirror I
protected @Nullable AnnotationMirror ASSIGNS_FIELDS
protected @Nullable AnnotationMirror BOTTOM_QUAL
public void initChecker(ProcessingEnvironment env)
SourceChecker
initChecker
in class BaseTypeChecker
AbstractProcessor.init(ProcessingEnvironment)
protected TypeHierarchy createTypeHierarchy()
BaseTypeChecker
createTypeHierarchy
in class BaseTypeChecker
public boolean isAssignable(@Mutable AnnotatedTypeMirror varType, @Mutable AnnotatedTypeMirror receiverType, @Nullable Tree varTree, AnnotatedTypeFactory factory)
BaseTypeChecker
isAssignable
in class BaseTypeChecker
varType
- the annotated variable typevarTree
- tree used to access the variable