public class LockAnnotatedTypeFactory extends BasicAnnotatedTypeFactory<LockChecker>
Lock
type system.
The annotated types returned by class contain GuardedBy
type
qualifiers only for the locks that are not currently held.AnnotatedTypeFactory.InheritedFromClassAnnotator
checker, defaults, flow, FLOW_BY_DEFAULT, poly, treeAnnotator, typeAnnotator, useFlow
elements, fromTreeCache, processingEnv, qualHierarchy, root, trees, types, uid, visitorState
Constructor and Description |
---|
LockAnnotatedTypeFactory(LockChecker checker,
CompilationUnitTree root) |
Modifier and Type | Method and Description |
---|---|
AnnotationMirror |
aliasedAnnotation(AnnotationMirror a)
Returns the canonical annotation for the passed annotation if it is
an alias of a canonical one in the framework.
|
void |
annotateImplicit(Tree tree,
AnnotatedTypeMirror type)
Adds implicit annotations to a type obtained from a
Tree . |
List<String> |
getHeldLock() |
protected boolean |
hasGuardedBy(AnnotatedTypeMirror t) |
void |
setHeldLocks(List<String> heldLocks) |
annotateImplicit, constructorFromUse, createFlow, createFlowQualifiers, createQualifierDefaults, createQualifierPolymorphism, createTreeAnnotator, createTypeAnnotator, methodFromUse, postDirectSuperTypes, postInit
addAliasedAnnotation, addAliasedDeclAnnotation, annotateInheritedFromClass, canHaveAnnotatedTypeParameters, createLRUCache, declarationFromElement, fromClass, fromElement, fromElement, fromElement, fromExpression, fromMember, fromNewClass, fromTypeTree, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedTypeFromTypeTree, getAnnotationWithMetaAnnotation, getBoxedType, getCurrentClassTree, getCurrentClassType, getCurrentMethodReceiver, getDeclAnnotation, getDeclAnnotations, getDeclAnnotationTree, getDeclAnnotationWithMetaAnnotation, getDefaultedAnnotatedType, getElementUtils, getEnclosingType, getImplicitReceiverType, getPath, getProcessingEnv, getQualifierHierarchy, getReceiverType, getSelfType, getUnboxedType, getUninferredMethodTypeArgument, getVisitorState, isAnyEnclosingThisDeref, isMostEnclosingThisDeref, isSupportedQualifier, isWithinConstructor, postAsMemberOf, toAnnotatedType, toString, type, typeVariablesFromUse
public LockAnnotatedTypeFactory(LockChecker checker, CompilationUnitTree root)
protected boolean hasGuardedBy(AnnotatedTypeMirror t)
public void annotateImplicit(Tree tree, AnnotatedTypeMirror type)
AnnotatedTypeFactory
Tree
. By
default, this method does nothing. Subclasses should use this method to
implement implicit annotations specific to their type systems.annotateImplicit
in class BasicAnnotatedTypeFactory<LockChecker>
tree
- an AST nodetype
- the type obtained from tree
public AnnotationMirror aliasedAnnotation(AnnotationMirror a)
AnnotatedTypeFactory
aliasedAnnotation
in class AnnotatedTypeFactory
a
- the qualifier to check for an alias