|
|||||||||
| 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={ReadOnly.class,Mutable.class,Immutable.class,I.class,AssignsFields.class,checkers.igj.IGJPlaceHolder.class})
public class IGJChecker
A type-checker plug-in for the IGJ immutability type system that finds (and
verifies the absence of) undesired side-effect errors.
The IGJ language is a Java language extension that expresses immutability
constraints, using six annotations: ReadOnly, Mutable,
Immutable, I -- a polymorphic qualifier, Assignable,
and AssignsFields. The language is specified by the FSE 2007 paper.
| Field Summary | |
|---|---|
protected AnnotationMirror |
ASSIGNS_FIELDS
Supported Annotations for IGJ. |
protected AnnotationMirror |
I
Supported Annotations for IGJ. |
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.source.SourceChecker |
|---|
currentRoot, env, messager, messages, skipPattern, trees |
| Fields inherited from class javax.annotation.processing.AbstractProcessor |
|---|
processingEnv |
| Constructor Summary | |
|---|---|
IGJChecker()
|
|
| Method Summary | |
|---|---|
protected TypeHierarchy |
createTypeHierarchy()
Creates the type subtyping checker using the current type qualifier hierarchy. |
void |
init(ProcessingEnvironment processingEnv)
|
boolean |
isAssignable(AnnotatedTypeMirror varType,
AnnotatedTypeMirror receiverType,
Tree varTree)
Return true if the assignment variable is an assignable field or variable, and returns false otherwise. |
boolean |
isValidUse(AnnotatedTypeMirror.AnnotatedDeclaredType elemType,
AnnotatedTypeMirror.AnnotatedDeclaredType use)
Tests that the qualifiers presents on the useType are valid qualifier, based on the declaration type, elementType. |
| Methods inherited from class checkers.basetype.BaseTypeChecker |
|---|
createFactory, createQualifierHierarchy, createSourceVisitor, createSupportedTypeQualifiers, getQualifierHierarchy, getSupportedLintOptions, getSupportedTypeQualifiers, isSubtype |
| Methods inherited from class checkers.source.SourceChecker |
|---|
getLintOption, getLintOption, getMessages, getProcessingEnvironment, getShouldSkip, getSupportedAnnotationTypes, getSupportedOptions, getSupportedSourceVersion, getSuppressWarningsKey, message, process, report, shouldSkip |
| Methods inherited from class javax.annotation.processing.AbstractProcessor |
|---|
getCompletions, isInitialized |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected AnnotationMirror READONLY
protected AnnotationMirror MUTABLE
protected AnnotationMirror IMMUTABLE
protected AnnotationMirror I
protected AnnotationMirror ASSIGNS_FIELDS
protected AnnotationMirror PLACE_HOLDER
| Constructor Detail |
|---|
public IGJChecker()
| Method Detail |
|---|
public void init(ProcessingEnvironment processingEnv)
SourceChecker
init in interface Processorinit in class BaseTypeCheckerAbstractProcessor.init(javax.annotation.processing.ProcessingEnvironment)
public boolean isAssignable(AnnotatedTypeMirror varType,
AnnotatedTypeMirror receiverType,
Tree varTree)
Assignable
3. accessed through a mutable reference
4. reassigned with an AssignsFields method and owned by 'this'
isAssignable in class BaseTypeCheckervarType - the annotated variable typevarTree - tree used to access the variable
public boolean isValidUse(AnnotatedTypeMirror.AnnotatedDeclaredType elemType,
AnnotatedTypeMirror.AnnotatedDeclaredType use)
BaseTypeChecker
isValidUse in class BaseTypeCheckerelemType - the type of the class (TypeElement)use - the use of the class (instance type)
protected TypeHierarchy createTypeHierarchy()
BaseTypeChecker
createTypeHierarchy in class BaseTypeChecker
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||