public class NullnessSubchecker extends BaseTypeChecker
NonNull
,
Nullable
,
Raw
SourceChecker.CheckerError
Modifier and Type | Field and Description |
---|---|
static boolean |
ADVANCEDCHECKS_DEFAULT |
protected @Nullable AnnotationMirror |
NONNULL |
protected @Nullable AnnotationMirror |
NULLABLE |
static boolean |
NULLTEST_DEFAULT |
protected @Nullable AnnotationMirror |
PRIMITIVE |
static boolean |
UNINIT_DEFAULT |
currentPath, currentRoot, env, messager, messages, trees
processingEnv
Constructor and Description |
---|
NullnessSubchecker() |
Modifier and Type | Method and Description |
---|---|
protected TypeHierarchy |
createTypeHierarchy()
Creates the type subtyping checker using the current type qualifier
hierarchy.
|
void |
initChecker(ProcessingEnvironment processingEnv)
Initialize the checker.
|
boolean |
isSubtype(@Mutable AnnotatedTypeMirror sub,
@Mutable AnnotatedTypeMirror sup)
Tests whether one annotated type is a subtype of another, with
respect to the annotations on these types.
|
createFactory, createQualifierHierarchy, createQualifierHierarchyFactory, createSourceVisitor, createSupportedTypeQualifiers, getQualifierHierarchy, getSupportedLintOptions, getSupportedTypeQualifiers, invokeConstructorFor, isAssignable
errorAbort, errorAbort, formatStackTrace, fullMessageOf, getLintOption, getLintOption, getMessages, getProcessingEnvironment, getSupportedAnnotationTypes, getSupportedOptions, getSupportedSourceVersion, getSuppressWarningsKey, init, message, report, shouldSkipDefs, shouldSkipDefs, shouldSkipUses, typeProcess
process, typeProcessingOver
getCompletions, isInitialized, toString
public static final boolean UNINIT_DEFAULT
public static final boolean NULLTEST_DEFAULT
public static final boolean ADVANCEDCHECKS_DEFAULT
protected @Nullable AnnotationMirror NONNULL
protected @Nullable AnnotationMirror NULLABLE
protected @Nullable AnnotationMirror PRIMITIVE
public void initChecker(ProcessingEnvironment processingEnv)
SourceChecker
initChecker
in class BaseTypeChecker
AbstractProcessor.init(ProcessingEnvironment)
protected TypeHierarchy createTypeHierarchy()
BaseTypeChecker
createTypeHierarchy
in class BaseTypeChecker
public boolean isSubtype(@Mutable AnnotatedTypeMirror sub, @Mutable AnnotatedTypeMirror sup)
BaseTypeChecker
TypeHierarchy
. Its behavior is undefined for any annotations
not specified by either TypeQualifiers
or the result of
BaseTypeChecker.getSupportedTypeQualifiers()
.isSubtype
in class BaseTypeChecker
sub
- the child typesup
- the parent typesub
is a subtype of sup