Class LhsExceptionAnnotatedTypeFactory
- All Implemented Interfaces:
AnnotationProvider
LhsExceptionChecker.-
Nested Class Summary
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
Fields inherited from class org.checkerframework.framework.testchecker.util.FlowTestAnnotatedTypeFactory
BOTTOM, TOP, VALUEFields inherited from class org.checkerframework.framework.type.GenericAnnotatedTypeFactory
analysis, arraysAreRelevant, cfgVisualizer, contractsUtils, defaults, dependentTypesHelper, emptyStore, exceptionalExitStores, flowByDefault, flowResult, flowResultAnalysisCaches, formalParameterPattern, hasOrIsSubchecker, initializationStaticStore, initializationStore, parsePhasePrimaryDefaultsCache, poly, regularExitStores, relevantJavaTypes, returnStatementStores, scannedClasses, shouldClearSubcheckerSharedCFGs, sideEffectsUnrefineAliases, subcheckerSharedCFG, transfer, treeAnnotator, typeAnnotatorFields inherited from class org.checkerframework.framework.type.AnnotatedTypeFactory
ajavaTypes, annotatedForApplyToSubpackagesElement, annotatedForListValueElement, annotatedForValueElement, capturedTypeVarSubstitutor, checker, currentFileAjavaTypes, defaultQualifierListValueElement, elements, ensuresQualifierExpressionElement, ensuresQualifierIfExpressionElement, ensuresQualifierIfListTM, ensuresQualifierIfListValueElement, ensuresQualifierIfResultElement, ensuresQualifierIfTM, ensuresQualifierListTM, ensuresQualifierListValueElement, ensuresQualifierTM, fieldInvariantFieldElement, fieldInvariantQualifierElement, fromExpressionTreeCache, fromMemberTreeCache, fromTypeTreeCache, hasQualifierParameterApplyToSubpackagesElement, hasQualifierParameterValueElement, ignoreRawTypeArguments, inferenceResultCache, loader, methodValClassNameElement, methodValMethodNameElement, methodValParamsElement, nodeValueInferenceResultCache, noQualifierParameterValueElement, objectGetClass, processingEnv, qualHierarchy, qualifierUpperBounds, reflectionResolver, requiresQualifierExpressionElement, requiresQualifierListTM, requiresQualifierListValueElement, requiresQualifierTM, shouldCache, stubTypes, trees, typeArgumentInference, typeFormatter, typeHierarchy, typeInformationPresenter, types, typeVarSubstitutor, uid, UNANNOTATED_FOR_NAME, unannotatedForApplyToSubpackagesElement, unannotatedForListValueElement, unannotatedForValueElement, viewpointAdapter -
Constructor Summary
ConstructorsConstructorDescriptionCreates a LhsExceptionAnnotatedTypeFactory. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAdds default qualifiers for type-checked code by readingDefaultForandDefaultQualifierInHierarchymeta-annotations.protected voidaddComputedTypeAnnotations(Tree tree, AnnotatedTypeMirror type) Changes annotations on a type obtained from aTree.Methods inherited from class org.checkerframework.framework.testchecker.util.FlowTestAnnotatedTypeFactory
createQualifierHierarchy, createSupportedTypeQualifiersMethods inherited from class org.checkerframework.common.basetype.BaseAnnotatedTypeFactory
createFlowAnalysisMethods inherited from class org.checkerframework.framework.type.GenericAnnotatedTypeFactory
addAnnotationsFromDefaultForType, addCheckedStandardDefaults, addComputedTypeAnnotations, addComputedTypeAnnotationsWithoutFlow, addDefaultAnnotations, addSharedCFGForTree, addUncheckedStandardDefaults, analyze, annotationsForIrrelevantJavaType, applyInferredAnnotations, applyQualifierParameterDefaults, applyQualifierParameterDefaults, canCacheFlowDependentType, canUseCachedFlowDependentType, checkForDefaultQualifierInHierarchy, clearParsePhaseCache, constructorFromUse, constructorFromUsePreSubstitution, createAndInitQualifierDefaults, createCFGVisualizer, createContractsFromMethod, createDefaultForTypeAnnotator, createDefaultForUseTypeAnnotator, createDependentTypesHelper, createFlowTransferFunction, createQualifierDefaults, createQualifierPolymorphism, createRequiresOrEnsuresQualifier, createTreeAnnotator, createTypeAnnotator, getAnnotatedTypeBefore, getAnnotatedTypeLhs, getAnnotatedTypeLhsNoTypeVarDefault, getAnnotatedTypeRhsUnaryAssign, getAnnotatedTypeVarargsArray, getAnnotationFromJavaExpression, getAnnotationFromJavaExpressionString, getAnnotationMirrorFromJavaExpressionString, getAnnotationsFromJavaExpression, getCFGVisualizer, getContractExpressions, getContractsFromMethod, getDefaultAnnosForUses, getDefaultAnnotations, getDefaultForTypeAnnotator, getDefaultValueAnnotatedType, getDependentTypesHelper, getEmptyStore, getEnsuresQualifierIfResult, getExceptionalExitStore, getExplicitNewClassAnnos, getExplicitNewClassClassTypeArgs, getExpressionAndOffsetFromJavaExpressionString, getFinalLocalValues, getFinalLocalValues, getFirstNodeOfKindForTree, getInferredValueFor, getMethodReturnType, getNodesForTree, getQualifierDefaults, getQualifierPolymorphism, getRegularExitStore, getReturnStatementStores, getSharedCFGForTree, getShouldDefaultTypeVarLocals, getSortedQualifierNames, getStandaloneTypeForNodeValue, getStoreAfter, getStoreAfter, getStoreBefore, getStoreBefore, getSupportedMonotonicTypeQualifiers, getTypeFactoryOfSubchecker, getTypeFactoryOfSubcheckerOrNull, getUseFlow, handleCFGViz, irrelevantExtraMessage, isAnonymousDiamondSupertypeFinal, isComputingAnnotatedTypeMirrorOfLhs, isComputingNodeValue, isIgnoredExceptionType, isNotFullyInitializedReceiver, isRelevant, isRelevant, isRelevantImpl, isUnreachable, methodFromUse, methodFromUsePreSubstitution, parseJavaExpressionString, performFlowAnalysisForClass, performFlowAnalysisForClassImpl, performFlowAnalysisForClassOnce, postAnalyze, postAsMemberOf, postInit, preProcessClassTree, runWithBodyVisitorPath, setRoot, typeVariablesFromUseMethods inherited from class org.checkerframework.framework.type.AnnotatedTypeFactory
adaptGetClassReturnTypeToReceiver, addAliasedDeclAnnotation, addAliasedDeclAnnotation, addAliasedTypeAnnotation, addAliasedTypeAnnotation, addAliasedTypeAnnotation, addAliasedTypeAnnotation, addAnnotationFromFieldInvariant, addInheritedAnnotation, annotatedForPrecedesUnannotatedFor, applyCaptureConversion, applyCaptureConversion, applyUnboxing, areSameByClass, asSupportedQualifier, binaryTreeArgTypes, binaryTreeArgTypes, canonicalAnnotation, clearNodeValueInferenceResults, combineIntersectionBoundAnnotationsInHierarchy, compoundAssignmentTreeArgTypes, constructorFromUse, constructorFromUseWithoutTypeArgInference, containsCapturedTypes, containsSameByClass, containsSameOrAlias, createAnnotatedTypeFormatter, createAnnotationClassLoader, createAnnotationFormatter, createQualifierUpperBounds, createTypeArgumentInference, createTypeHierarchy, createTypeInformationPresenter, createTypeVariableSubstitutor, createViewpointAdapter, declarationFromElement, doesAnnotatedForApplyToSubpackages, doesAnnotatedForApplyToThisChecker, doesUnannotatedForApplyToSubpackages, doesUnannotatedForApplyToThisChecker, fromElement, fromElement, fromElement, getAnnotatedForAnnotations, getAnnotatedNullType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedTypeFormatter, getAnnotatedTypeFromTypeTree, getAnnotationByClass, getAnnotationFormatter, getAnnotationMirror, getAnnotationOrTypeDeclarationBound, getAnnotationWithMetaAnnotation, getAnonymousDiamondCreation, getAnonymousDiamondSuperConstructor, getAnonymousDiamondSupertype, getBoxedType, getBundledTypeQualifiers, getCacheSize, getChecker, getCheckerNames, getConstructorReceiverType, getContractExpressions, getContractListValues, getDeclAnnotation, getDeclAnnotationNoAliases, getDeclAnnotations, getDeclAnnotationWithMetaAnnotation, getDefaultQualifierAnnotations, getDefaultTypeDeclarationBounds, getDirectSupertypes, getDummyAssignedTo, getElementAnnotations, getElementUtils, getEnclosingClassOrMethod, getEnclosingSubType, getEnclosingType, getEnumConstructorQualifiers, getExpressionAndOffset, getFieldInvariantAnnotationTree, getFieldInvariantDeclarationAnnotations, getFieldInvariants, getFnInterfaceFromTree, getFunctionTypeFromTree, getFunctionTypeFromTree, getImplicitReceiverType, getInferenceWorkBudget, getInitializerTargetType, getIterableElementType, getIterableElementType, getMethodReceiverType, getMethodReturnType, getNarrowedAnnotations, getNarrowedPrimitive, getPath, getProcessingEnv, getQualifierHierarchy, getQualifierParameterHierarchies, getQualifierParameterHierarchies, getQualifierUpperBounds, getReceiverType, getResultingTypeOfConstructorMemberReference, getRoot, getSelfType, getSelfType, getStringType, getSupportedTypeQualifierNames, getSupportedTypeQualifiers, getTreeUtils, getTypeArgumentInference, getTypeDeclarationBounds, getTypeDeclarationBoundsFromUse, getTypeHierarchy, getTypeOfExtendsImplements, getTypeVarSubstitutor, getUnannotatedForAnnotations, getUnboxedType, getViewpointAdaptedTypeDeclarationBounds, getVisitorTreePath, getWidenedAnnotations, getWidenedType, getWidenedType, hasExplicitNoQualifierParameterInHierarchy, hasExplicitQualifierParameterInHierarchy, hasQualifierParameterInHierarchy, hasQualifierParameterInHierarchy, inferTypeArguments, initializeAtm, initializeReflectionResolution, isAliasedTypeAnnotation, isComputingInitializerTargetType, isDeterministic, isFromByteCode, isFromStubFile, isImmutable, isInferringStandalone, isParsingAnnotationFile, isSideEffectFree, isSupportedQualifier, isSupportedQualifier, isSupportedQualifier, isSupportedQualifierOrAlias, isWithinConstructor, mergeAnnotationFileAnnosIntoType, methodFromUse, methodFromUse, methodFromUse, methodFromUseWithoutTypeArgInference, methodFromUseWithoutTypeArgInference, negateConstant, order, overriddenMethodType, parseAnnotationFiles, permissiveOverriddenType, postDirectSuperTypes, postProcessClassTree, replaceAnnotations, replaceAnnotations, setPathForArtificialTree, setVisitorTreePath, shouldCacheElementType, shouldCacheMethodAsMemberOf, shouldStoreInBytecode, shouldWarnIfStubRedundantWithBytecode, toAnnotatedType, toString, type
-
Constructor Details
-
LhsExceptionAnnotatedTypeFactory
Creates a LhsExceptionAnnotatedTypeFactory.- Parameters:
checker- the checker
-
-
Method Details
-
addCheckedCodeDefaults
Adds default qualifiers for type-checked code by readingDefaultForandDefaultQualifierInHierarchymeta-annotations. Subclasses may override this method to add defaults that cannot be specified with aDefaultFororDefaultQualifierInHierarchymeta-annotations.Also defaults local variables to the top qualifier, so that a local variable whose type is a type variable gets it unless
GenericAnnotatedTypeFactory.getAnnotatedTypeLhsNoTypeVarDefault(com.sun.source.tree.Tree)is computing its type.- Overrides:
addCheckedCodeDefaultsin classFlowTestAnnotatedTypeFactory- Parameters:
defs- the QualifierDefault object to which defaults are added
-
addComputedTypeAnnotations
Changes annotations on a type obtained from aTree. By default, this method does nothing. GenericAnnotatedTypeFactory uses this method to implement defaulting and inference (flow-sensitive type refinement). Its subclasses usually override it only to customize default annotations.Subclasses that override this method should also override
AnnotatedTypeFactory.addComputedTypeAnnotations(Element, AnnotatedTypeMirror).This method adds defaults and flow-sensitive type refinements.
Throws when called from
GenericAnnotatedTypeFactory.getAnnotatedTypeLhs(com.sun.source.tree.Tree)for a variable namedthrowInLhs, and when called fromGenericAnnotatedTypeFactory.getAnnotatedTypeLhsNoTypeVarDefault(com.sun.source.tree.Tree)for a variable namedthrowInLhsNoTypeVarDefault. AUserErroris reported without the version of the Checker Framework, so the expected output does not depend on it.- Overrides:
addComputedTypeAnnotationsin classGenericAnnotatedTypeFactory<CFValue,CFStore, CFTransfer, CFAnalysis> - Parameters:
tree- an AST nodetype- the type obtained fromtree- See Also:
-