Class InitializationAnnotatedTypeFactory<Value extends CFAbstractValue<Value>,Store extends InitializationStore<Value,Store>,Transfer extends InitializationTransfer<Value,Transfer,Store>,Flow extends CFAbstractAnalysis<Value,Store,Transfer>>
- All Implemented Interfaces:
AnnotationProvider
- Direct Known Subclasses:
NullnessAnnotatedTypeFactory
NullnessChecker.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classprotected classprotected classTheQualifierHierarchyfor the initialization type system.Nested classes/interfaces inherited from class org.checkerframework.framework.type.GenericAnnotatedTypeFactory
GenericAnnotatedTypeFactory.ScanStateNested classes/interfaces inherited from class org.checkerframework.framework.type.AnnotatedTypeFactory
AnnotatedTypeFactory.CapturedTypeVarSubstitutor, AnnotatedTypeFactory.ParameterizedExecutableType -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AnnotationMirrorString representation of all initialization annotations.protected final Set<Class<? extends Annotation>> Cache for the initialization annotations.protected final AnnotationMirrorprotected final AnnotationMirrorNotOnlyInitializedor null.protected final TypeMirrorThe java.lang.Object type.protected final AnnotationMirrorUnderInitializationor null.protected final ExecutableElementThe UnderInitialization.value field/element.protected final AnnotationMirrorprotected final ExecutableElementThe UnknownInitialization.value field/element.protected final ExecutableElementThe Unused.when field/element.Fields inherited from class org.checkerframework.framework.type.GenericAnnotatedTypeFactory
analysis, arraysAreRelevant, cfgVisualizer, contractsUtils, defaults, dependentTypesHelper, emptyStore, exceptionalExitStores, flowByDefault, flowResult, flowResultAnalysisCaches, formalParameterPattern, hasOrIsSubchecker, initializationStaticStore, initializationStore, methodInvocationStores, poly, regularExitStores, relevantJavaTypes, returnStatementStores, scannedClasses, shouldClearSubcheckerSharedCFGs, sideEffectsUnrefineAliases, subcheckerSharedCFG, transfer, treeAnnotator, typeAnnotatorFields inherited from class org.checkerframework.framework.type.AnnotatedTypeFactory
ajavaTypes, annotatedForValueElement, artificialTreeToEnclosingElementMap, capturedTypeVarSubstitutor, checker, currentFileAjavaTypes, elements, ensuresQualifierExpressionElement, ensuresQualifierIfExpressionElement, ensuresQualifierIfListTM, ensuresQualifierIfListValueElement, ensuresQualifierIfResultElement, ensuresQualifierIfTM, ensuresQualifierListTM, ensuresQualifierListValueElement, ensuresQualifierTM, fieldInvariantFieldElement, fieldInvariantQualifierElement, fromExpressionTreeCache, fromMemberTreeCache, fromTypeTreeCache, hasQualifierParameterValueElement, ignoreRawTypeArguments, loader, methodValClassNameElement, methodValMethodNameElement, methodValParamsElement, noQualifierParameterValueElement, objectGetClass, processingEnv, qualHierarchy, qualifierUpperBounds, reflectionResolver, requiresQualifierExpressionElement, requiresQualifierListTM, requiresQualifierListValueElement, requiresQualifierTM, root, shouldCache, stubTypes, trees, typeArgumentInference, typeFormatter, typeHierarchy, typeInformationPresenter, types, typeVarSubstitutor, uid, wpiOutputFormat -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreate a new InitializationAnnotatedTypeFactory. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanareAllFieldsInitializedOnly(ClassTree classTree) Are all fields initialized-only?protected TreeAnnotatorReturns aTreeAnnotatorthat adds annotations to a type based on the contents of a tree.protected TypeAnnotatorReturns aDefaultForTypeAnnotatorthat adds annotations to a type based on the content of the type itself.createUnderInitializationAnnotation(Class<?> typeFrame) Creates aUnderInitializationannotation with the given type frame.createUnderInitializationAnnotation(TypeMirror typeFrame) Creates aUnderInitializationannotation with the given type as its type frame argument.createUnknownInitializationAnnotation(Class<?> typeFrame) Creates aUnknownInitializationannotation with a given type frame.createUnknownInitializationAnnotation(TypeMirror typeFrame) Creates anUnknownInitializationannotation with a given type frame.getAnnotatedTypeLhs(Tree lhsTree) Returns the type of a left-hand side of an assignment.abstract AnnotationMirrorReturns the annotation that makes up the invariant of this commitment type system, such as@NonNull.Set<Class<? extends Annotation>> getInitializedInvariantFields(Store store, TreePath path) Returns the fields that have the invariant annotation and are initialized in a given store.Set<Class<? extends Annotation>> Returns the list of annotations that is forbidden for the constructor return type.getSelfType(Tree tree) Returns the type ofthisat the location oftree.getTypeFrameFromAnnotation(AnnotationMirror annotation) Returns the type frame (that is, the argument) of a given initialization annotation.protected AnnotationMirrorReturns anUnderInitializationannotation that has the superclass oftypeas type frame.org.plumelib.util.IPair<List<VariableTree>, List<VariableTree>> getUninitializedFields(Store store, TreePath path, boolean isStatic, Collection<? extends AnnotationMirror> receiverAnnotations) Returns the fields that are not yet initialized in a given store.final List<VariableTree> getUninitializedInvariantFields(Store store, TreePath path, boolean isStatic, List<? extends AnnotationMirror> receiverAnnotations) Returns the fields that have the invariant annotation and are not yet initialized in a given store.protected final booleanReturns whether or notfieldhas the invariant annotation.protected abstract booleanhasFieldInvariantAnnotation(AnnotatedTypeMirror type, VariableElement fieldElement) Returns whether or nottypehas the invariant annotation.booleanisFbcBottom(AnnotationMirror anno) Isannothe bottom annotation?booleanDoesannohave the bottom annotation?protected booleanIs the annotationannoan initialization qualifier?booleanIsannotheInitializedannotation?booleanDoesannohave the annotationInitialized?booleanisInitializedForFrame(AnnotatedTypeMirror type, TypeMirror frame) Return true if the type is initialized with respect to the given frame -- that is, all of the fields of the frame are initialized.booleanIsannotheUnderInitializationannotation (with any type frame)?booleanDoesannohave the annotationUnderInitialization(with any type frame)?booleanIsannotheUnknownInitializationannotation (with any type frame)?booleanDoesannohave the annotationUnknownInitialization(with any type frame)?methodFromUse(ExpressionTree tree, ExecutableElement methodElt, AnnotatedTypeMirror receiverType, boolean inferTypeArgs) voidpostAsMemberOf(AnnotatedTypeMirror type, AnnotatedTypeMirror owner, Element element) A callback method for the AnnotatedTypeFactory subtypes to customize AnnotatedTypes.asMemberOf().protected voidsetSelfTypeInInitializationCode(Tree tree, AnnotatedTypeMirror.AnnotatedDeclaredType selfType, TreePath path) Side-effects argumentselfTypeto make it @Initialized or @UnderInitialization, depending on whether all fields have been set.Methods inherited from class org.checkerframework.framework.type.GenericAnnotatedTypeFactory
addAnnotationsFromDefaultForType, addCheckedCodeDefaults, addCheckedStandardDefaults, addComputedTypeAnnotations, addComputedTypeAnnotations, addComputedTypeAnnotations, addComputedTypeAnnotationsForWarnRedundant, addDefaultAnnotations, addSharedCFGForTree, addUncheckedStandardDefaults, analyze, annotationsForIrrelevantJavaType, applyInferredAnnotations, applyQualifierParameterDefaults, applyQualifierParameterDefaults, checkAndPerformFlowAnalysis, checkForDefaultQualifierInHierarchy, constructorFromUse, constructorFromUsePreSubstitution, createAndInitQualifierDefaults, createCFGVisualizer, createContractsFromMethod, createDefaultForTypeAnnotator, createDefaultForUseTypeAnnotator, createDependentTypesHelper, createFlowAnalysis, createFlowTransferFunction, createQualifierDefaults, createQualifierPolymorphism, createRequiresOrEnsuresQualifier, getAnnotatedTypeLhsNoTypeVarDefault, getAnnotatedTypeRhsUnaryAssign, getAnnotatedTypeVarargsArray, getAnnotationFromJavaExpression, getAnnotationFromJavaExpressionString, getAnnotationMirrorFromJavaExpressionString, getAnnotationsFromJavaExpression, getCFGVisualizer, getContractAnnotations, getContractAnnotations, getContractExpressions, getContractsFromMethod, getDefaultAnnotations, getDefaultAnnotationsForWarnRedundant, getDefaultForTypeAnnotator, getDefaultValueAnnotatedType, getDependentTypesHelper, getEmptyStore, getEnsuresQualifierIfResult, getExceptionalExitStore, getExplicitNewClassAnnos, getExplicitNewClassClassTypeArgs, getExpressionAndOffsetFromJavaExpressionString, getFinalLocalValues, getFirstNodeOfKindForTree, getInferredValueFor, getMethodReturnType, getNodesForTree, getPostconditionAnnotations, getPostconditionAnnotations, getPostconditionAnnotations, getPreconditionAnnotations, getPreconditionAnnotations, getPreconditionAnnotations, getPreOrPostconditionAnnotations, getQualifierPolymorphism, getRegularExitStore, getReturnStatementStores, getSharedCFGForTree, getShouldDefaultTypeVarLocals, getSortedQualifierNames, getStoreAfter, getStoreAfter, getStoreAfter, getStoreBefore, getStoreBefore, getStoreBefore, getSupportedMonotonicTypeQualifiers, getTypeFactoryOfSubchecker, getTypeFactoryOfSubcheckerOrNull, handleCFGViz, irrelevantExtraMessage, isIgnoredExceptionType, isRelevant, isRelevant, isRelevantImpl, isUnreachable, methodFromUse, methodFromUsePreSubstitution, parseJavaExpressionString, performFlowAnalysis, postAnalyze, postDirectSuperTypes, postInit, preProcessClassTree, setRoot, typeVariablesFromUseMethods inherited from class org.checkerframework.framework.type.AnnotatedTypeFactory
adaptGetClassReturnTypeToReceiver, addAliasedDeclAnnotation, addAliasedTypeAnnotation, addAliasedTypeAnnotation, addAliasedTypeAnnotation, addAliasedTypeAnnotation, addAnnotationFromFieldInvariant, addInheritedAnnotation, applyCaptureConversion, applyCaptureConversion, applyUnboxing, areSameByClass, binaryTreeArgTypes, binaryTreeArgTypes, canonicalAnnotation, checkInvalidOptionsInferSignatures, compoundAssignmentTreeArgTypes, constructorFromUse, constructorFromUseWithoutTypeArgInference, containsCapturedTypes, containsSameByClass, createAnnotatedTypeFormatter, createAnnotationClassLoader, createAnnotationFormatter, createQualifierHierarchy, createQualifierUpperBounds, createSupportedTypeQualifiers, createTypeArgumentInference, createTypeHierarchy, createTypeInformationPresenter, createTypeVariableSubstitutor, declarationFromElement, doesAnnotatedForApplyToThisChecker, fromElement, fromElement, fromElement, getAnnotatedNullType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedTypeFormatter, getAnnotatedTypeFromTypeTree, getAnnotationByClass, getAnnotationFormatter, getAnnotationMirror, getAnnotationWithMetaAnnotation, getBoxedType, getBundledTypeQualifiers, getCacheSize, getChecker, getCheckerNames, getContractExpressions, getContractListValues, getDeclAnnotation, getDeclAnnotationNoAliases, getDeclAnnotations, getDeclAnnotationWithMetaAnnotation, getDefaultTypeDeclarationBounds, getDummyAssignedTo, getElementUtils, getEnclosingClassOrMethod, getEnclosingElementForArtificialTree, getEnclosingSubType, getEnclosingType, getEnumConstructorQualifiers, getExpressionAndOffset, getFieldInvariantAnnotationTree, getFieldInvariantDeclarationAnnotations, getFieldInvariants, getFnInterfaceFromTree, getFunctionTypeFromTree, getFunctionTypeFromTree, getImplicitReceiverType, getIterableElementType, getIterableElementType, getMethodReturnType, getNarrowedAnnotations, getNarrowedPrimitive, getPath, getProcessingEnv, getQualifierHierarchy, getQualifierParameterHierarchies, getQualifierParameterHierarchies, getQualifierUpperBounds, getReceiverType, getResultingTypeOfConstructorMemberReference, getStringType, getSupportedTypeQualifierNames, getSupportedTypeQualifiers, getTreeUtils, getTypeArgumentInference, getTypeDeclarationBounds, getTypeHierarchy, getTypeOfExtendsImplements, getTypeVarSubstitutor, getUnboxedType, getVisitorTreePath, getWholeProgramInference, getWidenedAnnotations, getWidenedType, getWidenedType, hasExplicitNoQualifierParameterInHierarchy, hasExplicitQualifierParameterInHierarchy, hasQualifierParameterInHierarchy, hasQualifierParameterInHierarchy, initializeAtm, initializeReflectionResolution, isDeterministic, isFromByteCode, isFromStubFile, isImmutable, isSideEffectFree, isSupportedQualifier, isSupportedQualifier, isSupportedQualifier, isTop, isWithinConstructor, logGat, makeConditionConsistentWithOtherMethod, mergeAnnotationFileAnnosIntoType, methodFromUse, methodFromUse, methodFromUseWithoutTypeArgInference, methodFromUseWithoutTypeArgInference, negateConstant, order, parseAnnotationFiles, postProcessClassTree, replaceAnnotations, replaceAnnotations, setEnclosingElementForArtificialTree, setVisitorTreePath, shouldWarnIfStubRedundantWithBytecode, toAnnotatedType, toString, type, wpiAdjustForUpdateField, wpiAdjustForUpdateNonField, wpiPrepareMethodForWriting, wpiPrepareMethodForWriting, wpiShouldInferTypesForReceivers
-
Field Details
-
UNKNOWN_INITIALIZATION
-
INITIALIZED
-
UNDER_INITALIZATION
UnderInitializationor null. -
NOT_ONLY_INITIALIZED
NotOnlyInitializedor null. -
FBCBOTTOM
-
objectTypeMirror
The java.lang.Object type. -
unusedWhenElement
The Unused.when field/element. -
underInitializationValueElement
The UnderInitialization.value field/element. -
unknownInitializationValueElement
The UnknownInitialization.value field/element. -
initAnnos
Cache for the initialization annotations. -
initAnnoNames
String representation of all initialization annotations.UnknownInitializationUnderInitializationInitializedFBCBottomThis is used to quickly check of an AnnotationMirror is one of the initialization annotations without having to repeatedly convert them to strings.
-
-
Constructor Details
-
InitializationAnnotatedTypeFactory
Create a new InitializationAnnotatedTypeFactory.- Parameters:
checker- the checker to which the new type factory belongs
-
-
Method Details
-
getInitializationAnnotations
-
isInitializationAnnotation
Is the annotationannoan initialization qualifier?- Parameters:
anno- the annotation to check- Returns:
- true if the argument is an initialization qualifier
-
getInvalidConstructorReturnTypeAnnotations
Returns the list of annotations that is forbidden for the constructor return type.- Returns:
- the list of annotations that is forbidden for the constructor return type
-
getFieldInvariantAnnotation
Returns the annotation that makes up the invariant of this commitment type system, such as@NonNull.- Returns:
- the invariant annotation for this type system
-
hasFieldInvariantAnnotation
Returns whether or notfieldhas the invariant annotation.This method is a convenience method for
hasFieldInvariantAnnotation(AnnotatedTypeMirror, VariableElement).If the
fieldis a type variable, this method returns true if any possible instantiation of the type parameter could have the invariant annotation. SeehasFieldInvariantAnnotation(VariableTree)for an example.- Parameters:
field- field that might have invariant annotation- Returns:
- whether or not field has the invariant annotation
-
hasFieldInvariantAnnotation
protected abstract boolean hasFieldInvariantAnnotation(AnnotatedTypeMirror type, VariableElement fieldElement) Returns whether or nottypehas the invariant annotation.If the
typeis a type variable, this method returns true if any possible instantiation of the type parameter could have the invariant annotation. SeehasFieldInvariantAnnotation(VariableTree)for an example.- Parameters:
type- of field that might have invariant annotationfieldElement- the field element, which can be used to check annotations on the declaration- Returns:
- whether or not the type has the invariant annotation
-
createUnderInitializationAnnotation
Creates aUnderInitializationannotation with the given type as its type frame argument.- Parameters:
typeFrame- the type down to which some value has been initialized- Returns:
- an
UnderInitializationannotation with the given argument
-
createUnderInitializationAnnotation
Creates aUnderInitializationannotation with the given type frame.- Parameters:
typeFrame- the type down to which some value has been initialized- Returns:
- an
UnderInitializationannotation with the given argument
-
createUnknownInitializationAnnotation
Creates aUnknownInitializationannotation with a given type frame.- Parameters:
typeFrame- the type down to which some value has been initialized- Returns:
- an
UnknownInitializationannotation with the given argument
-
createUnknownInitializationAnnotation
Creates anUnknownInitializationannotation with a given type frame.- Parameters:
typeFrame- the type down to which some value has been initialized- Returns:
- an
UnknownInitializationannotation with the given argument
-
getTypeFrameFromAnnotation
Returns the type frame (that is, the argument) of a given initialization annotation.- Parameters:
annotation- aUnderInitializationorUnknownInitializationannotation- Returns:
- the annotation's argument
-
isUnderInitialization
IsannotheUnderInitializationannotation (with any type frame)?- Parameters:
anno- the annotation to check- Returns:
- true if
annoisUnderInitialization
-
isUnknownInitialization
IsannotheUnknownInitializationannotation (with any type frame)?- Parameters:
anno- the annotation to check- Returns:
- true if
annoisUnknownInitialization
-
isFbcBottom
Isannothe bottom annotation?- Parameters:
anno- the annotation to check- Returns:
- true if
annoisFBCBottom
-
isInitialized
IsannotheInitializedannotation?- Parameters:
anno- the annotation to check- Returns:
- true if
annoisInitialized
-
isUnderInitialization
Doesannohave the annotationUnderInitialization(with any type frame)?- Parameters:
anno- the annotation to check- Returns:
- true if
annohasUnderInitialization
-
isUnknownInitialization
Doesannohave the annotationUnknownInitialization(with any type frame)?- Parameters:
anno- the annotation to check- Returns:
- true if
annohasUnknownInitialization
-
isFbcBottom
Doesannohave the bottom annotation?- Parameters:
anno- the annotation to check- Returns:
- true if
annohasFBCBottom
-
isInitialized
Doesannohave the annotationInitialized?- Parameters:
anno- the annotation to check- Returns:
- true if
annohasInitialized
-
areAllFieldsInitializedOnly
Are all fields initialized-only?- Parameters:
classTree- the class to query- Returns:
- true if all fields are initialized-only
-
postAsMemberOf
A callback method for the AnnotatedTypeFactory subtypes to customize AnnotatedTypes.asMemberOf(). Overriding methods should merely change the annotations on the subtypes, without changing the types.In most cases, subclasses want to call this method first because it may clear all annotations and use the hierarchy's root annotations.
- Overrides:
postAsMemberOfin classGenericAnnotatedTypeFactory<Value extends CFAbstractValue<Value>,Store extends InitializationStore<Value, Store>, Transfer extends InitializationTransfer<Value, Transfer, Store>, Flow extends CFAbstractAnalysis<Value, Store, Transfer>> - Parameters:
type- the annotated type of the elementowner- the annotated type of the receiver of the accessing treeelement- the element of the field or method
-
getAnnotatedTypeLhs
Description copied from class:GenericAnnotatedTypeFactoryReturns the type of a left-hand side of an assignment.The default implementation returns the type without considering dataflow type refinement. Subclass can override this method and add additional logic for computing the type of a LHS.
- Overrides:
getAnnotatedTypeLhsin classGenericAnnotatedTypeFactory<Value extends CFAbstractValue<Value>,Store extends InitializationStore<Value, Store>, Transfer extends InitializationTransfer<Value, Transfer, Store>, Flow extends CFAbstractAnalysis<Value, Store, Transfer>> - Parameters:
lhsTree- left-hand side of an assignment- Returns:
- AnnotatedTypeMirror of
lhsTree
-
getSelfType
Description copied from class:AnnotatedTypeFactoryReturns the type ofthisat the location oftree. Returnsnulliftreeis in a location wherethishas no meaning, such as the body of a static method.The parameter is an arbitrary tree and does not have to mention "this", neither explicitly nor implicitly. This method can be overridden for type-system specific behavior.
- Overrides:
getSelfTypein classAnnotatedTypeFactory- Parameters:
tree- location used to decide the type ofthis- Returns:
- the type of
thisat the location oftree
-
setSelfTypeInInitializationCode
protected void setSelfTypeInInitializationCode(Tree tree, AnnotatedTypeMirror.AnnotatedDeclaredType selfType, TreePath path) Side-effects argumentselfTypeto make it @Initialized or @UnderInitialization, depending on whether all fields have been set.- Parameters:
tree- a treeselfType- the type to side-effectpath- a path
-
getUnderInitializationAnnotationOfSuperType
Returns anUnderInitializationannotation that has the superclass oftypeas type frame.- Parameters:
type- a type- Returns:
- true an
UnderInitializationfor the supertype oftype
-
getUninitializedFields
public org.plumelib.util.IPair<List<VariableTree>,List<VariableTree>> getUninitializedFields(Store store, TreePath path, boolean isStatic, Collection<? extends AnnotationMirror> receiverAnnotations) Returns the fields that are not yet initialized in a given store. The result is a pair of lists:- fields that are not yet initialized and have the invariant annotation
- fields that are not yet initialized and do not have the invariant annotation
- Parameters:
store- a storepath- the current path, used to determine the current classisStatic- whether to report static fields or instance fieldsreceiverAnnotations- the annotations on the receiver- Returns:
- the fields that are not yet initialized in a given store (a pair of lists)
-
getUninitializedInvariantFields
public final List<VariableTree> getUninitializedInvariantFields(Store store, TreePath path, boolean isStatic, List<? extends AnnotationMirror> receiverAnnotations) Returns the fields that have the invariant annotation and are not yet initialized in a given store.- Parameters:
store- a storepath- the current path, used to determine the current classisStatic- whether to report static fields or instance fieldsreceiverAnnotations- the annotations on the receiver- Returns:
- the fields that have the invariant annotation and are not yet initialized in a given store (a pair of lists)
-
getInitializedInvariantFields
Returns the fields that have the invariant annotation and are initialized in a given store.- Parameters:
store- a storepath- the current path; used to compute the current class- Returns:
- the fields that have the invariant annotation and are initialized in a given store
-
isInitializedForFrame
Return true if the type is initialized with respect to the given frame -- that is, all of the fields of the frame are initialized.- Parameters:
type- the type whose initialization type qualifiers to checkframe- a class intype's class hierarchy- Returns:
- true if the type is initialized for the given frame
-
createTypeAnnotator
Description copied from class:GenericAnnotatedTypeFactoryReturns aDefaultForTypeAnnotatorthat adds annotations to a type based on the content of the type itself.Subclass may override this method. The default type annotator is a
ListTypeAnnotatorof the following:IrrelevantTypeAnnotator: Adds top to types not listed in the@RelevantJavaTypesannotation on the checker.PropagationTypeAnnotator: Propagates annotation onto wildcards.
- Overrides:
createTypeAnnotatorin classGenericAnnotatedTypeFactory<Value extends CFAbstractValue<Value>,Store extends InitializationStore<Value, Store>, Transfer extends InitializationTransfer<Value, Transfer, Store>, Flow extends CFAbstractAnalysis<Value, Store, Transfer>> - Returns:
- a type annotator
-
createTreeAnnotator
Description copied from class:GenericAnnotatedTypeFactoryReturns aTreeAnnotatorthat adds annotations to a type based on the contents of a tree.The default tree annotator is a
ListTreeAnnotatorof the following:PropagationTreeAnnotator: Propagates annotations from subtreesLiteralTreeAnnotator: Adds annotations based onQualifierForLiteralsmeta-annotationsDependentTypesTreeAnnotator: Adapts dependent annotations based on context
Subclasses may override this method to specify additional tree annotators, for example:
new ListTreeAnnotator(super.createTreeAnnotator(), new KeyLookupTreeAnnotator(this));
- Overrides:
createTreeAnnotatorin classGenericAnnotatedTypeFactory<Value extends CFAbstractValue<Value>,Store extends InitializationStore<Value, Store>, Transfer extends InitializationTransfer<Value, Transfer, Store>, Flow extends CFAbstractAnalysis<Value, Store, Transfer>> - Returns:
- a tree annotator
-
methodFromUse
protected AnnotatedTypeFactory.ParameterizedExecutableType methodFromUse(ExpressionTree tree, ExecutableElement methodElt, AnnotatedTypeMirror receiverType, boolean inferTypeArgs) Description copied from class:AnnotatedTypeFactoryThe implementation ofAnnotatedTypeFactory.methodFromUse(ExpressionTree, ExecutableElement, AnnotatedTypeMirror)andAnnotatedTypeFactory.methodFromUseWithoutTypeArgInference(ExpressionTree, ExecutableElement, AnnotatedTypeMirror).- Overrides:
methodFromUsein classAnnotatedTypeFactory- Parameters:
tree- either a MethodInvocationTree or a MemberReferenceTreemethodElt- the element of the referenced methodreceiverType- the type of the receiverinferTypeArgs- whether type arguments should be inferred- Returns:
- the type of the invoked method
-