| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcheckers.types.AnnotatedTypeFactory
checkers.types.BasicAnnotatedTypeFactory<Checker>
public class BasicAnnotatedTypeFactory<Checker extends BaseTypeChecker>
A factory that extends AnnotatedTypeFactory to optionally use
 flow-sensitive qualifier inference, qualifier polymorphism, implicit annotations
 via ImplicitFor, and user-specified defaults via DefaultQualifier
Flow| Field Summary | |
|---|---|
| protected  QualifierDefaults | defaultsto handle defaults specified by the user | 
| protected  Flow | flowFlow sensitive instance | 
| protected static boolean | FLOW_BY_DEFAULTshould use flow by default | 
| protected  QualifierPolymorphism | polyto handle any polymorphic types | 
| protected  TreeAnnotator | treeAnnotatorto annotate types based on the given un-annotated types | 
| protected  TypeAnnotator | typeAnnotatorto annotate types based on the given tree | 
| protected  boolean | useFlowShould use flow analysis? | 
| Fields inherited from class checkers.types.AnnotatedTypeFactory | 
|---|
| annotations, atypes, elements, env, qualHierarchy, root, trees, types, visitorState | 
| Constructor Summary | |
|---|---|
| BasicAnnotatedTypeFactory(Checker checker,
                          CompilationUnitTree root)Creates a type factory for checking the given compilation unit with respect to the given annotation. | |
| BasicAnnotatedTypeFactory(Checker checker,
                          CompilationUnitTree root,
                          boolean useFlow)Creates a type factory for checking the given compilation unit with respect to the given annotation. | |
| Method Summary | |
|---|---|
| protected  void | annotateImplicit(Element elt,
                 AnnotatedTypeMirror type)Adds implicit annotations to a type obtained from a Element. | 
| protected  void | annotateImplicit(Tree tree,
                 AnnotatedTypeMirror type)Adds implicit annotations to a type obtained from a Tree. | 
| protected  Flow | createFlow(Checker checker,
           CompilationUnitTree root,
           Set<AnnotationMirror> flowQuals)Returns a Flowinstance that performs flow sensitive analysis
 to infer qualifiers on unqualified types. | 
| protected  TreeAnnotator | createTreeAnnotator(Checker checker)Returns a TreeAnnotatorthat adds annotations to a type based
 on the contents of a tree. | 
| protected  TypeAnnotator | createTypeAnnotator(Checker checker)Returns a TypeAnnotatorthat adds annotations to a type based
 on the content of the type itself. | 
|  AnnotatedTypeMirror.AnnotatedExecutableType | methodFromUse(MethodInvocationTree tree)Determines the type of the invoked method based on the passed method invocation tree. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected static boolean FLOW_BY_DEFAULT
protected final TypeAnnotator typeAnnotator
protected final TreeAnnotator treeAnnotator
protected final QualifierPolymorphism poly
protected final QualifierDefaults defaults
protected boolean useFlow
protected final Flow flow
| Constructor Detail | 
|---|
public BasicAnnotatedTypeFactory(Checker checker,
                                 CompilationUnitTree root,
                                 boolean useFlow)
checker - the checker to which this type factory belongsroot - the compilation unit to scanuseFlow - whether flow analysis should be performed
public BasicAnnotatedTypeFactory(Checker checker,
                                 CompilationUnitTree root)
checker - the checker to which this type factory belongsroot - the compilation unit to scan| Method Detail | 
|---|
protected TreeAnnotator createTreeAnnotator(Checker checker)
TreeAnnotator that adds annotations to a type based
 on the contents of a tree.
 Subclasses may override this method to specify more appriopriate
 TreeAnnotator
protected TypeAnnotator createTypeAnnotator(Checker checker)
TypeAnnotator that adds annotations to a type based
 on the content of the type itself.
protected Flow createFlow(Checker checker,
                          CompilationUnitTree root,
                          Set<AnnotationMirror> flowQuals)
Flow instance that performs flow sensitive analysis
 to infer qualifiers on unqualified types.
checker - the checkerroot - the compilation unit associated with this factoryflowQuals - the qualifiers to infer
protected void annotateImplicit(Tree tree,
                                AnnotatedTypeMirror type)
AnnotatedTypeFactoryTree. By
 default, this method does nothing. Subclasses should use this method to
 implement implicit annotations specific to their type systems.
annotateImplicit in class AnnotatedTypeFactorytree - an AST nodetype - the type obtained from tree
protected void annotateImplicit(Element elt,
                                AnnotatedTypeMirror type)
AnnotatedTypeFactoryElement. By
 default, this method does nothing. Subclasses should use this method to
 implement implicit annotations specific to their type systems.
annotateImplicit in class AnnotatedTypeFactoryelt - an elementtype - the type obtained from eltpublic AnnotatedTypeMirror.AnnotatedExecutableType methodFromUse(MethodInvocationTree tree)
AnnotatedTypeFactoryAnnotatedTypes.asMemberOf(AnnotatedTypeMirror, Element), and
 customization based on receiver type should be in accordance to its
 specification.
methodFromUse in class AnnotatedTypeFactorytree - the method invocation tree
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||