@TypeQualifiers(value={Nullable.class,LazyNonNull.class,NonNull.class,Primitive.class,PolyNull.class,PolyAll.class}) @SupportedLintOptions(value={"nulltest","uninitialized","advancedchecks","arrays:forbidnonnullcomponents"}) public class NullnessSubchecker extends BaseTypeChecker
NonNull
,
Nullable
,
Raw
SourceChecker.CheckerError
Modifier and Type | Field and Description |
---|---|
static boolean |
ADVANCEDCHECKS_DEFAULT |
protected AnnotationMirror |
LAZYNONNULL |
protected AnnotationMirror |
NONNULL |
protected AnnotationMirror |
NULLABLE |
static boolean |
NULLTEST_DEFAULT |
protected AnnotationMirror |
POLYNULL |
protected AnnotationMirror |
PRIMITIVE |
protected RawnessSubchecker |
rawnesschecker |
static boolean |
UNINIT_DEFAULT |
currentPath, currentRoot, DETAILS_SEPARATOR, messager, messages, trees
processingEnv
Constructor and Description |
---|
NullnessSubchecker() |
Modifier and Type | Method and Description |
---|---|
AnnotatedTypeFactory |
createFactory(CompilationUnitTree root)
Constructs an instance of the appropriate type factory for the
implemented type system.
|
QualifierHierarchy |
createQualifierHierarchy(MultiGraphQualifierHierarchy.MultiGraphFactory factory)
Factory method to easily change what QualifierHierarchy is
created.
|
protected MultiGraphQualifierHierarchy.MultiGraphFactory |
createQualifierHierarchyFactory()
Factory method to easily change what Factory is used to
create a QualifierHierarchy.
|
protected TypeHierarchy |
createTypeHierarchy()
Creates the type subtyping checker using the current type qualifier
hierarchy.
|
void |
initChecker()
Initialize the checker.
|
createQualifierHierarchy, createSourceVisitor, createSupportedTypeQualifiers, getQualifierHierarchy, getSupportedLintOptions, getSupportedTypeQualifiers, getTypeHierarchy, invokeConstructorFor
createSupportedLintOptions, errorAbort, errorAbort, formatStackTrace, fullMessageOf, getLintOption, getLintOption, getMessages, getProcessingEnvironment, getProperties, getSupportedAnnotationTypes, getSupportedOptions, getSupportedSourceVersion, getSuppressWarningsKey, message, printStats, report, setLintOption, setSupportedLintOptions, shouldAddShutdownHook, shouldSkipDefs, shouldSkipDefs, shouldSkipUses, shutdownHook, typeProcess, typeProcessingStart
init, process, typeProcessingOver
getCompletions, isInitialized, toString
public static final boolean UNINIT_DEFAULT
public static final boolean NULLTEST_DEFAULT
public static final boolean ADVANCEDCHECKS_DEFAULT
protected AnnotationMirror NONNULL
protected AnnotationMirror NULLABLE
protected AnnotationMirror LAZYNONNULL
protected AnnotationMirror PRIMITIVE
protected AnnotationMirror POLYNULL
protected RawnessSubchecker rawnesschecker
public void initChecker()
SourceChecker
initChecker
in class BaseTypeChecker
AbstractProcessor.init(ProcessingEnvironment)
public AnnotatedTypeFactory createFactory(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 TypeHierarchy createTypeHierarchy()
BaseTypeChecker
createTypeHierarchy
in class BaseTypeChecker
protected MultiGraphQualifierHierarchy.MultiGraphFactory createQualifierHierarchyFactory()
BaseTypeChecker
createQualifierHierarchyFactory
in class BaseTypeChecker
public QualifierHierarchy createQualifierHierarchy(MultiGraphQualifierHierarchy.MultiGraphFactory factory)
BaseTypeChecker
createQualifierHierarchy
in class BaseTypeChecker