public class JavariChecker extends BaseTypeChecker
@ReadOnly
, @Mutable
,
@Assignable
, @PolyRead
and @QReadOnly
).SourceChecker.CheckerError
Modifier and Type | Field and Description |
---|---|
protected @Nullable AnnotationMirror |
ASSIGNABLE |
protected @Nullable AnnotationMirror |
MUTABLE |
protected @Nullable AnnotationMirror |
POLYREAD |
protected @Nullable AnnotationMirror |
QREADONLY |
protected @Nullable AnnotationMirror |
READONLY |
protected @Nullable AnnotationMirror |
THISMUTABLE |
currentPath, currentRoot, env, messager, messages, trees
processingEnv
Constructor and Description |
---|
JavariChecker() |
Modifier and Type | Method and Description |
---|---|
protected TypeHierarchy |
createTypeHierarchy()
Implements the
@QReadOnly behavior on generic types,
creating a new TypeHierarchy class that allows a
comparison of type arguments to succeed if the left hand side
is annotated with @QReadOnly or if the regular
comparison succeeds. |
void |
initChecker(ProcessingEnvironment processingEnv)
Initializes the checker: calls init method on super class,
creates a local AnnotationFactory based on the processing
environment, and uses it to create the protected
AnnotationMirrors used through this checker.
|
boolean |
isSubtype(@Mutable AnnotatedTypeMirror sub,
@Mutable AnnotatedTypeMirror sup)
Checks if one the parameters is primitive, or if a type is
subtype of another.
|
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
protected @Nullable AnnotationMirror READONLY
protected @Nullable AnnotationMirror THISMUTABLE
protected @Nullable AnnotationMirror MUTABLE
protected @Nullable AnnotationMirror POLYREAD
protected @Nullable AnnotationMirror QREADONLY
protected @Nullable AnnotationMirror ASSIGNABLE
public void initChecker(ProcessingEnvironment processingEnv)
initChecker
in class BaseTypeChecker
processingEnv
- the processing environment to use in the local AnnotationFactoryAbstractProcessor.init(ProcessingEnvironment)
protected TypeHierarchy createTypeHierarchy()
@QReadOnly
behavior on generic types,
creating a new TypeHierarchy
class that allows a
comparison of type arguments to succeed if the left hand side
is annotated with @QReadOnly
or if the regular
comparison succeeds.createTypeHierarchy
in class BaseTypeChecker
public boolean isSubtype(@Mutable AnnotatedTypeMirror sub, @Mutable AnnotatedTypeMirror sup)
isSubtype
in class BaseTypeChecker
sub
- the child typesup
- the parent typesub
is a subtype of sup