checkers.tainting
Class TaintingAnnotatedTypeFactory

java.lang.Object
  extended by checkers.types.AnnotatedTypeFactory
      extended by checkers.types.BasicAnnotatedTypeFactory<TaintingChecker>
          extended by checkers.tainting.TaintingAnnotatedTypeFactory

public class TaintingAnnotatedTypeFactory
extends BasicAnnotatedTypeFactory<TaintingChecker>

Adds implicit and default Untainted annotation, only if the user does not explicitly insert them.

This factory will add the Untainted annotation to a type if the input is

  1. a string literal (Note: Handled by Unqualified meta-annotation)
  2. a string concatenation where both operands are untainted


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
TaintingAnnotatedTypeFactory(TaintingChecker checker, CompilationUnitTree root)
           
 
Method Summary
Modifier and Type Method and Description
protected  TreeAnnotator createTreeAnnotator(TaintingChecker checker)
          Returns a TreeAnnotator that adds annotations to a type based on the contents of a tree.
 
Methods inherited from class checkers.types.BasicAnnotatedTypeFactory
annotateImplicit, annotateImplicit, createFlow, createFlowQualifiers, createTypeAnnotator, methodFromUse, postDirectSuperTypes
 
Methods inherited from class checkers.types.AnnotatedTypeFactory
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, toString, unify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TaintingAnnotatedTypeFactory

public TaintingAnnotatedTypeFactory(TaintingChecker checker,
                                    CompilationUnitTree root)
Method Detail

createTreeAnnotator

protected TreeAnnotator createTreeAnnotator(TaintingChecker checker)
Description copied from class: BasicAnnotatedTypeFactory
Returns a TreeAnnotator that adds annotations to a type based on the contents of a tree. Subclasses may override this method to specify more appriopriate TreeAnnotator

Overrides:
createTreeAnnotator in class BasicAnnotatedTypeFactory<TaintingChecker>
Returns:
a tree annotator