checkers.linear
Class LinearAnnotatedTypeFactory

java.lang.Object
  extended by checkers.types.AnnotatedTypeFactory
      extended by checkers.types.BasicAnnotatedTypeFactory<LinearChecker>
          extended by checkers.linear.LinearAnnotatedTypeFactory

public class LinearAnnotatedTypeFactory
extends BasicAnnotatedTypeFactory<LinearChecker>

Adds Unusable qualifier to a type if it represents:

  1. Class declaration tree/element. Such a construct usually requires the root qualifier.
  2. Linear reference once it is "used up"


Nested Class Summary
Modifier and Type Class and Description
 
Nested classes/interfaces inherited from class checkers.types.AnnotatedTypeFactory
AnnotatedTypeFactory.InheritedFromClassAnnotator
 
Field Summary
Modifier and Type Field and Description
 
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, fromTreeCache, qualHierarchy, root, trees, types, uid, visitorState
 
Constructor Summary
Constructor and Description
LinearAnnotatedTypeFactory(LinearChecker checker, CompilationUnitTree root)
           
 
Method Summary
Modifier and Type Method and Description
 void annotateImplicit(Element elt, AnnotatedTypeMirror type)
          Case 1: type of class declaration
 Flow createFlow(LinearChecker checker, CompilationUnitTree tree, Set<AnnotationMirror> flowQuals)
          Returns a Flow instance that performs flow sensitive analysis to infer qualifiers on unqualified types.
 
Methods inherited from class checkers.types.BasicAnnotatedTypeFactory
annotateImplicit, createFlowQualifiers, createTreeAnnotator, createTypeAnnotator, methodFromUse, postDirectSuperTypes
 
Methods inherited from class checkers.types.AnnotatedTypeFactory
addAliasedAnnotation, aliasedAnnotation, annotateInheritedFromClass, canHaveAnnotatedTypeParameters, constructorFromUse, createLRUCache, declarationFromElement, fromClass, fromElement, fromElement, fromElement, fromExpression, fromMember, fromNewClass, fromTypeTree, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedTypeFromTypeTree, getBoxedType, getCurrentClassType, getCurrentMethodReceiver, getEnclosingType, getImplicitReceiverType, getPath, getQualifierHierarchy, getReceiver, getSelfType, getUnboxedType, getVisitorState, isMostEnclosingThisDeref, isWithinConstructor, postAsMemberOf, postInit, toAnnotatedType, toString, unify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LinearAnnotatedTypeFactory

public LinearAnnotatedTypeFactory(LinearChecker checker,
                                  CompilationUnitTree root)
Method Detail

annotateImplicit

public void annotateImplicit(Element elt,
                             AnnotatedTypeMirror type)
Case 1: type of class declaration

Overrides:
annotateImplicit in class BasicAnnotatedTypeFactory<LinearChecker>
Parameters:
elt - an element
type - the type obtained from elt

createFlow

public Flow createFlow(LinearChecker checker,
                       CompilationUnitTree tree,
                       Set<AnnotationMirror> flowQuals)
Description copied from class: BasicAnnotatedTypeFactory
Returns a Flow instance that performs flow sensitive analysis to infer qualifiers on unqualified types.

Overrides:
createFlow in class BasicAnnotatedTypeFactory<LinearChecker>
Parameters:
checker - the checker
tree - the compilation unit associated with this factory
flowQuals - the qualifiers to infer
Returns:
the flow analysis class