public class MethodValAnnotatedTypeFactory extends BaseAnnotatedTypeFactory
AnnotationProvider
that provides ClassVal
,
StringVal
, and ArrayLen
annotations.Modifier and Type | Class and Description |
---|---|
protected class |
MethodValAnnotatedTypeFactory.MethodValQualifierHierarchy
The qualifier hierarchy for the MethodVal type system
|
protected class |
MethodValAnnotatedTypeFactory.MethodValTreeAnnotator
TreeAnnotator with the visitMethodInvocation method overridden
|
GenericAnnotatedTypeFactory.ScanState
AnnotatedTypeFactory.InheritedFromClassAnnotator
analyses, defaults, FLOW_BY_DEFAULT, flowResult, initializationStaticStore, initializationStore, methodInvocationStores, poly, regularExitStores, returnStatementStores, scannedClasses, treeAnnotator, typeAnnotator, useFlow
checker, elements, fromTreeCache, processingEnv, qualHierarchy, root, SHOULD_CACHE, SHOULD_READ_CACHE, shouldCache, shouldReadCache, trees, typeHierarchy, types, uid, visitorState
Constructor and Description |
---|
MethodValAnnotatedTypeFactory(BaseTypeChecker checker,
AnnotationProvider annotationProvider)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
QualifierHierarchy |
createQualifierHierarchy()
Returns the type qualifier hierarchy graph to be used by this processor.
|
protected java.util.Set<java.lang.Class<? extends java.lang.annotation.Annotation>> |
createSupportedTypeQualifiers()
If the checker class is annotated with
TypeQualifiers , return an immutable set with the same set
of classes as the annotation. |
protected TreeAnnotator |
createTreeAnnotator()
Returns a
TreeAnnotator that adds annotations to a type based
on the contents of a tree. |
createFlowAnalysis
analyze, annotateImplicit, annotateImplicit, annotateImplicit, annotateImplicitWithFlow, applyInferredAnnotations, constructorFromUse, createFlowTransferFunction, createQualifierDefaults, createQualifierPolymorphism, createTypeAnnotator, dotOutputFileName, getDefaultedAnnotatedType, getEmptyStore, getFinalLocalValues, getInferredValueFor, getNodeForTree, getRegularExitStore, getReturnStatementStores, getStoreAfter, getStoreBefore, getSupportedMonotonicTypeQualifiers, getUseFlow, methodFromUse, performFlowAnalysis, postDirectSuperTypes, postInit, setRoot, setUseFlow
addAliasedAnnotation, addAliasedDeclAnnotation, aliasedAnnotation, annotateInheritedFromClass, annotateInheritedFromClass, buildIndexTypes, createLRUCache, createQualifierHierarchy, createQualifierHierarchy, createQualifierHierarchyFactory, createTypeHierarchy, declarationFromElement, fromClass, fromElement, fromElement, fromElement, fromExpression, fromMember, fromNewClass, fromTypeTree, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedTypeFromTypeTree, getAnnotationMirror, getAnnotationWithMetaAnnotation, getBoxedType, getCurrentClassTree, getCurrentClassType, getCurrentMethodReceiver, getDeclAnnotation, getDeclAnnotations, getDeclAnnotationWithMetaAnnotation, getElementUtils, getEnclosingMethod, getEnclosingType, getImplicitReceiverType, getMethodReturnType, getMethodReturnType, getPath, getProcessingEnv, getQualifierHierarchy, getReceiverType, getSelfType, getSupportedTypeQualifiers, getTreeUtils, getTypeHierarchy, getUnboxedType, getUninferredWildcardType, getVisitorState, getWildcardBoundedBy, isAnyEnclosingThisDeref, isFromByteCode, isFromStubFile, isMostEnclosingThisDeref, isSupportedQualifier, isWithinConstructor, postAsMemberOf, postProcessClassTree, setPathHack, toAnnotatedType, toString, type, typeVariablesFromUse
public MethodValAnnotatedTypeFactory(BaseTypeChecker checker, AnnotationProvider annotationProvider)
checker
- The checker used with this AnnotatedTypeFactoryannotationProvider
- The AnnotationProvider providing the necessary ClassVal,
StringVal, and ArrayLen annotations.protected java.util.Set<java.lang.Class<? extends java.lang.annotation.Annotation>> createSupportedTypeQualifiers()
AnnotatedTypeFactory
TypeQualifiers
, return an immutable set with the same set
of classes as the annotation. If the class is not so annotated,
return an empty set.
Subclasses may override this method to return an immutable set
of their supported type qualifiers.createSupportedTypeQualifiers
in class AnnotatedTypeFactory
TypeQualifiers
public QualifierHierarchy createQualifierHierarchy()
AnnotatedTypeFactory
AnnotatedTypeFactory.getSupportedTypeQualifiers()
using the
meta-annotations found in them. The current implementation returns an
instance of GraphQualifierHierarchy
.
Subclasses may override this method to express any relationships that
cannot be inferred using meta-annotations (e.g. due to lack of
meta-annotations).createQualifierHierarchy
in class AnnotatedTypeFactory
protected TreeAnnotator createTreeAnnotator()
GenericAnnotatedTypeFactory
TreeAnnotator
that adds annotations to a type based
on the contents of a tree.
Subclasses may override this method to specify more appriopriate
TreeAnnotator
createTreeAnnotator
in class GenericAnnotatedTypeFactory<CFValue,CFStore,CFTransfer,CFAnalysis>