|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.annotation.processing.AbstractProcessor
checkers.source.SourceChecker
checkers.basetype.BaseTypeChecker
checkers.igj.IGJChecker
@TypeQualifiers(value={AssignsFields.class,I.class,Immutable.class,Mutable.class,ReadOnly.class,checkers.igj.IGJPlaceHolder.class}) @SupportedSourceVersion(value=RELEASE_7) public class IGJChecker
An annotation processor that checks a program use of IGJ mutability
type annotations, (@ReadOnly
, @Mutable
, and
@Immutable
).
Field Summary | |
---|---|
protected AnnotationFactory |
annoFactory
Annotation factory to create annotation mirrors |
protected AnnotationMirror |
ASSIGNS_FIELDS
Supported Annotations for IGJ. |
protected IGJAnnotatedTypeFactory |
factory
|
protected AnnotationMirror |
I
Supported Annotations for IGJ. |
protected static String |
IMMUTABILITY_KEY
|
protected AnnotationMirror |
IMMUTABLE
Supported Annotations for IGJ. |
protected AnnotationMirror |
MUTABLE
Supported Annotations for IGJ. |
protected AnnotationMirror |
PLACE_HOLDER
Supported Annotations for IGJ. |
protected AnnotationMirror |
READONLY
Supported Annotations for IGJ. |
Fields inherited from class checkers.basetype.BaseTypeChecker |
---|
qualHierarchy |
Fields inherited from class checkers.source.SourceChecker |
---|
currentRoot, env, messager, messages, skipPattern, trees, visitor |
Fields inherited from class javax.annotation.processing.AbstractProcessor |
---|
processingEnv |
Constructor Summary | |
---|---|
IGJChecker()
|
Method Summary | |
---|---|
IGJAnnotatedTypeFactory |
createFactory(CompilationUnitTree root)
Constructs an instance of the appropriate type factory for the implemented type system. |
protected TypeHierarchy |
createTypeHierarchy()
Creates the type subtyping checker using the current type qualifier hierarchy. |
void |
init(ProcessingEnvironment processingEnv)
|
boolean |
isAssignable(AnnotatedTypeMirror varType,
Tree varTree)
Return true if the assignment variable is an assignable field or variable, and returns false otherwise. |
boolean |
isValidUse(AnnotatedTypeMirror elemType,
AnnotatedTypeMirror use)
Tests whether the one annotated type is a valid use of another, with respect to the annotations on these types, without descending into generic or array types (i.e. |
Methods inherited from class checkers.basetype.BaseTypeChecker |
---|
createQualifierHierarchy, getQualifierHierarchy, getSourceVisitor, getSupportedLintOptions, getSupportedTypeQualifiers, isSubtype |
Methods inherited from class checkers.source.SourceChecker |
---|
getDefaultSkipPattern, getLintOption, getLintOption, getMessages, getProcessingEnvironment, getShouldSkip, getSupportedAnnotationTypes, getSupportedOptions, getSuppressWarningsKey, message, process, report, shouldSkip |
Methods inherited from class javax.annotation.processing.AbstractProcessor |
---|
getCompletions, getSupportedSourceVersion, isInitialized |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected AnnotationFactory annoFactory
protected AnnotationMirror READONLY
protected AnnotationMirror MUTABLE
protected AnnotationMirror IMMUTABLE
protected AnnotationMirror I
protected AnnotationMirror PLACE_HOLDER
protected AnnotationMirror ASSIGNS_FIELDS
protected IGJAnnotatedTypeFactory factory
protected static final String IMMUTABILITY_KEY
Constructor Detail |
---|
public IGJChecker()
Method Detail |
---|
public void init(ProcessingEnvironment processingEnv)
SourceChecker
init
in interface Processor
init
in class BaseTypeChecker
AbstractProcessor.init(javax.annotation.processing.ProcessingEnvironment)
public boolean isValidUse(AnnotatedTypeMirror elemType, AnnotatedTypeMirror use)
BaseTypeChecker
isValidUse
in class BaseTypeChecker
elemType
- the type of the class (TypeElement)use
- the use of the class (instance type)
protected TypeHierarchy createTypeHierarchy()
BaseTypeChecker
createTypeHierarchy
in class BaseTypeChecker
public boolean isAssignable(AnnotatedTypeMirror varType, Tree varTree)
Assignable
3. accessed through a mutable reference
4. reassigned with an AssignsFields
method and owned by 'this'
isAssignable
in class BaseTypeChecker
varType
- the annotated variable typevarTree
- tree used to access the variable
public IGJAnnotatedTypeFactory createFactory(CompilationUnitTree root)
BaseTypeChecker
AnnotatedTypeFactory
.
Subclasses may override this to construct the appropriate factory.
createFactory
in class BaseTypeChecker
root
- the currently visited compilation unit
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |