checkers.lock
Class LockAnnotatedTypeFactory

java.lang.Object
  extended by checkers.types.AnnotatedTypeFactory
      extended by checkers.types.BasicAnnotatedTypeFactory<LockChecker>
          extended by checkers.lock.LockAnnotatedTypeFactory

public class LockAnnotatedTypeFactory
extends BasicAnnotatedTypeFactory<LockChecker>

The type factory for Lock type system. The annotated types returned by class contain GuardedBy type qualifiers only for the locks that are not currently held.


Nested Class Summary
 
Nested classes/interfaces inherited from class checkers.types.AnnotatedTypeFactory
AnnotatedTypeFactory.InheritedFromClassAnnotator
 
Field Summary
 
Fields inherited from class checkers.types.BasicAnnotatedTypeFactory
defaults, flow, FLOW_BY_DEFAULT, poly, treeAnnotator, typeAnnotator, useFlow
 
Fields inherited from class checkers.types.AnnotatedTypeFactory
annotations, atypes, elements, env, qualHierarchy, root, trees, types, visitorState
 
Constructor Summary
LockAnnotatedTypeFactory(LockChecker checker, CompilationUnitTree root)
           
 
Method Summary
protected  void annotateImplicit(Tree tree, AnnotatedTypeMirror type)
          Adds implicit annotations to a type obtained from a Tree.
 List<String> getHeldLock()
           
 void setHeldLocks(List<String> heldLocks)
           
 
Methods inherited from class checkers.types.BasicAnnotatedTypeFactory
annotateImplicit, createFlow, createTreeAnnotator, createTypeAnnotator, methodFromUse, postDirectSuperTypes
 
Methods inherited from class checkers.types.AnnotatedTypeFactory
aliasedAnnotation, annotateInheritedFromClass, constructorFromUse, createLRUCache, declarationFromElement, fromClass, fromElement, fromElement, fromElement, fromExpression, fromMember, fromTypeTree, fromTypeTree, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedTypeFromTypeTree, getBoxedType, getCurrentClassType, getCurrentMethodReceiver, getEnclosingType, getImplicitReceiverType, getPath, getQualifierHierarchy, getReceiver, getSelfType, getUnboxedType, getVisitorState, isMostEnclosingThisDeref, postAsMemberOf, unify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LockAnnotatedTypeFactory

public LockAnnotatedTypeFactory(LockChecker checker,
                                CompilationUnitTree root)
Method Detail

setHeldLocks

public void setHeldLocks(List<String> heldLocks)

getHeldLock

public List<String> getHeldLock()

annotateImplicit

protected void annotateImplicit(Tree tree,
                                AnnotatedTypeMirror type)
Description copied from class: AnnotatedTypeFactory
Adds implicit annotations to a type obtained from a Tree. By default, this method does nothing. Subclasses should use this method to implement implicit annotations specific to their type systems.

Overrides:
annotateImplicit in class BasicAnnotatedTypeFactory<LockChecker>
Parameters:
tree - an AST node
type - the type obtained from tree