checkers.javari
Class JavariChecker
java.lang.Object
   javax.annotation.processing.AbstractProcessor
javax.annotation.processing.AbstractProcessor
       checkers.source.SourceChecker
checkers.source.SourceChecker
           checkers.basetype.BaseTypeChecker
checkers.basetype.BaseTypeChecker
               checkers.javari.JavariChecker
checkers.javari.JavariChecker
- All Implemented Interfaces: 
- Processor
- @TypeQualifiers(value={ReadOnly.class,ThisMutable.class,Mutable.class,PolyRead.class,QReadOnly.class})
public class JavariChecker
- extends BaseTypeChecker
An annotation processor that checks a program's use of the Javari
 type annotations (\@ReadOnly, \@Mutable, \@Assignable, \@PolyRead and \@QReadOnly).
- See the checkers manual:
- Javari Checker
 
 
 
 
 
 
 
| Methods inherited from class checkers.source.SourceChecker | 
| attribute, getLintOption, getLintOption, getMessages, getProcessingEnvironment, getShouldSkip, getSupportedAnnotationTypes, getSupportedOptions, getSupportedSourceVersion, getSuppressWarningsKey, message, process, report, shouldSkip | 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
READONLY
protected AnnotationMirror READONLY
THISMUTABLE
protected AnnotationMirror THISMUTABLE
MUTABLE
protected AnnotationMirror MUTABLE
POLYREAD
protected AnnotationMirror POLYREAD
QREADONLY
protected AnnotationMirror QREADONLY
ASSIGNABLE
protected AnnotationMirror ASSIGNABLE
JavariChecker
public JavariChecker()
init
public void init(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.
 
- 
- Specified by:
- initin interface- Processor
- Overrides:
- initin class- BaseTypeChecker
 
- 
- Parameters:
- processingEnv- the processing environment to use in the local AnnotationFactory
- See Also:
- AbstractProcessor.init(ProcessingEnvironment)
 
createTypeHierarchy
protected TypeHierarchy createTypeHierarchy()
- Implements the @QReadOnlybehavior on generic types,
 creating a newTypeHierarchyclass that allows a
 comparison of type arguments to succeed if the left hand side
 is annotated with@QReadOnlyor if the regular
 comparison succeeds.
 
- 
- Overrides:
- createTypeHierarchyin class- BaseTypeChecker
 
- 
- Returns:
- the type relations class to check type subtyping
 
isSubtype
public boolean isSubtype(AnnotatedTypeMirror sub,
                         AnnotatedTypeMirror sup)
- Checks if one the parameters is primitive, or if a type is
 subtype of another. Primitive types always pass to avoid issues
 with boxing.
 
- 
- Overrides:
- isSubtypein class- BaseTypeChecker
 
- 
- Parameters:
- sub- the child type
- sup- the parent type
- Returns:
- true iff subis a subtype ofsup
 
isValidUse
public boolean isValidUse(AnnotatedTypeMirror.AnnotatedDeclaredType elemType,
                          AnnotatedTypeMirror.AnnotatedDeclaredType useType)
- Always true; no type validity checking is made by the BaseTypeVisitor.
 
- 
- Overrides:
- isValidUsein class- BaseTypeChecker
 
- 
- Parameters:
- elemType- the type of the class (TypeElement)
- useType- the use of the class (instance type)
- Returns:
- if the useType is a valid use of elemType
- See Also:
- BaseTypeVisitor