public class LockAnnotatedTypeFactory extends BaseAnnotatedTypeFactory
Lock
type system.
The annotated types returned by class contain GuardedBy
type
qualifiers only for the locks that are not currently held.GenericAnnotatedTypeFactory.ScanState
AnnotatedTypeFactory.InheritedFromClassAnnotator
Modifier and Type | Field and Description |
---|---|
protected javax.lang.model.element.AnnotationMirror |
GUARDED_BY |
protected javax.lang.model.element.AnnotationMirror |
GUARDEDBY_BOT |
protected javax.lang.model.element.AnnotationMirror |
GUARDEDBY_TOP |
analyses, defaults, FLOW_BY_DEFAULT, flowResult, initializationStaticStore, initializationStore, methodInvocationStores, poly, regularExitStores, returnStatementStores, scannedClasses, treeAnnotator, typeAnnotator, useFlow
checker, elements, fromTreeCache, processingEnv, qualHierarchy, root, SHOULD_CACHE, SHOULD_READ_CACHE, shouldCache, shouldReadCache, trees, typeHierarchy, types, uid, visitorState
Constructor and Description |
---|
LockAnnotatedTypeFactory(BaseTypeChecker checker) |
Modifier and Type | Method and Description |
---|---|
javax.lang.model.element.AnnotationMirror |
aliasedAnnotation(javax.lang.model.element.AnnotationMirror a)
Returns the canonical annotation for the passed annotation if it is
an alias of a canonical one in the framework.
|
protected void |
annotateImplicit(com.sun.source.tree.Tree tree,
AnnotatedTypeMirror type,
boolean useFlow) |
QualifierHierarchy |
createQualifierHierarchy(MultiGraphQualifierHierarchy.MultiGraphFactory ignorefactory)
Factory method to easily change what QualifierHierarchy is
created.
|
java.util.List<java.lang.String> |
getHeldLock() |
protected boolean |
hasGuardedBy(AnnotatedTypeMirror t) |
void |
setHeldLocks(java.util.List<java.lang.String> heldLocks) |
createFlowAnalysis
analyze, annotateImplicit, annotateImplicit, annotateImplicitWithFlow, applyInferredAnnotations, constructorFromUse, createFlowTransferFunction, createQualifierDefaults, createQualifierPolymorphism, createTreeAnnotator, createTypeAnnotator, dotOutputFileName, getDefaultedAnnotatedType, getEmptyStore, getFinalLocalValues, getInferredValueFor, getNodeForTree, getRegularExitStore, getReturnStatementStores, getStoreAfter, getStoreBefore, getSupportedMonotonicTypeQualifiers, getUseFlow, methodFromUse, performFlowAnalysis, postDirectSuperTypes, postInit, setRoot, setUseFlow
addAliasedAnnotation, addAliasedDeclAnnotation, annotateInheritedFromClass, annotateInheritedFromClass, buildIndexTypes, createLRUCache, createQualifierHierarchy, createQualifierHierarchy, createQualifierHierarchyFactory, createSupportedTypeQualifiers, createTypeHierarchy, declarationFromElement, fromClass, fromElement, fromElement, fromElement, fromExpression, fromMember, fromNewClass, fromTypeTree, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedTypeFromTypeTree, getAnnotationMirror, getAnnotationWithMetaAnnotation, getBoxedType, getCurrentClassTree, getCurrentClassType, getCurrentMethodReceiver, getDeclAnnotation, getDeclAnnotations, getDeclAnnotationWithMetaAnnotation, getElementUtils, getEnclosingMethod, getEnclosingType, getImplicitReceiverType, getMethodReturnType, getMethodReturnType, getPath, getProcessingEnv, getQualifierHierarchy, getReceiverType, getSelfType, getSupportedTypeQualifiers, getTreeUtils, getTypeHierarchy, getUnboxedType, getUninferredWildcardType, getVisitorState, getWildcardBoundedBy, isAnyEnclosingThisDeref, isFromByteCode, isFromStubFile, isMostEnclosingThisDeref, isSupportedQualifier, isWithinConstructor, postAsMemberOf, postProcessClassTree, setPathHack, toAnnotatedType, toString, type, typeVariablesFromUse
protected final javax.lang.model.element.AnnotationMirror GUARDED_BY
protected final javax.lang.model.element.AnnotationMirror GUARDEDBY_TOP
protected final javax.lang.model.element.AnnotationMirror GUARDEDBY_BOT
public LockAnnotatedTypeFactory(BaseTypeChecker checker)
public void setHeldLocks(java.util.List<java.lang.String> heldLocks)
public java.util.List<java.lang.String> getHeldLock()
protected boolean hasGuardedBy(AnnotatedTypeMirror t)
protected void annotateImplicit(com.sun.source.tree.Tree tree, AnnotatedTypeMirror type, boolean useFlow)
annotateImplicit
in class GenericAnnotatedTypeFactory<CFValue,CFStore,CFTransfer,CFAnalysis>
public javax.lang.model.element.AnnotationMirror aliasedAnnotation(javax.lang.model.element.AnnotationMirror a)
AnnotatedTypeFactory
aliasedAnnotation
in class AnnotatedTypeFactory
a
- the qualifier to check for an aliaspublic QualifierHierarchy createQualifierHierarchy(MultiGraphQualifierHierarchy.MultiGraphFactory ignorefactory)
AnnotatedTypeFactory
createQualifierHierarchy
in class AnnotatedTypeFactory