Class SeqGrowAnnotatedTypeFactory
java.lang.Object
org.checkerframework.framework.type.AnnotatedTypeFactory
org.checkerframework.framework.type.GenericAnnotatedTypeFactory<CFValue,CFStore,CFTransfer,CFAnalysis>
org.checkerframework.common.basetype.BaseAnnotatedTypeFactory
org.checkerframework.checker.modifiability.ModifiabilityBaseAnnotatedTypeFactory
org.checkerframework.checker.modifiability.seqgrow.SeqGrowAnnotatedTypeFactory
- All Implemented Interfaces:
AnnotationProvider
The annotated type factory for the
SeqGrowChecker.-
Nested Class Summary
Nested classes/interfaces inherited from class org.checkerframework.framework.type.GenericAnnotatedTypeFactory
GenericAnnotatedTypeFactory.ClassAndStore<S>, GenericAnnotatedTypeFactory.JavaExpressionAndOffset, GenericAnnotatedTypeFactory.LambdaAndStore<S>, GenericAnnotatedTypeFactory.ScanStateNested classes/interfaces inherited from class org.checkerframework.framework.type.AnnotatedTypeFactory
AnnotatedTypeFactory.AnnotationWithMetaAnnotation, AnnotatedTypeFactory.BinaryArgTypes, AnnotatedTypeFactory.CapturedTypeVarSubstitutor, AnnotatedTypeFactory.ExpressionAndOffset, AnnotatedTypeFactory.FnInterfaceAndType, AnnotatedTypeFactory.ParameterizedExecutableType -
Field Summary
Fields inherited from class org.checkerframework.checker.modifiability.ModifiabilityBaseAnnotatedTypeFactory
collectionErasure, iteratorErasure, listIteratorErasure, mapEntryErasure, mapErasureFields inherited from class org.checkerframework.framework.type.GenericAnnotatedTypeFactory
analysis, arrayTypesAreRelevant, 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, debugGat, doesNotUnrefineReceiverValueElement, 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, sideEffectsOnlyValueElement, stubTypes, trees, typeArgumentInference, typeFormatter, typeHierarchy, typeInformationPresenter, types, typeVarSubstitutor, uid, wpiOutputFormat -
Constructor Summary
ConstructorsConstructorDescriptionCreates a SeqGrowAnnotatedTypeFactory. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanForMap.Entry, only the replace bit is meaningful to carry from the map receiver, so the sequenced-grow bit of@PolyModifiableis@MaybeSeqGrowable.protected booleanOnly sequenced collections and sequenced maps have sequenced-grow methods, so@Modifiableand@Unmodifiablemake no claim about any other type.protected List<TypeMirror> Returns erased types whose every subtype has this checker's capability, unlessModifiabilityBaseAnnotatedTypeFactory.typeLacksCapability(javax.lang.model.type.TypeMirror)holds of the subtype.Methods inherited from class org.checkerframework.checker.modifiability.ModifiabilityBaseAnnotatedTypeFactory
canonicalAnnotation, canonicalAnnotation, createSupportedTypeQualifiers, erasureOf, expandsModifiabilityAliases, hasNegativeCapability, methodFromUse, negativeCapability, polyCapability, positiveCapability, refinedIteratorResultBound, refineIteratorReturnType, refineReturnTypeForPreservesModifiability, topAnnotationMethods inherited from class org.checkerframework.common.basetype.BaseAnnotatedTypeFactory
createFlowAnalysisMethods inherited from class org.checkerframework.framework.type.GenericAnnotatedTypeFactory
addAnnotationsFromDefaultForType, addCheckedCodeDefaults, addCheckedStandardDefaults, addComputedTypeAnnotations, addComputedTypeAnnotations, addComputedTypeAnnotations, addComputedTypeAnnotationsForWarnRedundant, addDefaultAnnotations, addSharedCFGForTree, addUncheckedStandardDefaults, analyze, annotationsForIrrelevantJavaType, applyConservativeDefaults, applyInferredAnnotations, applyQualifierParameterDefaults, applyQualifierParameterDefaults, arrayTypesAreRelevant, artificialTreeMap, checkForDefaultQualifierInHierarchy, constructorFromUse, constructorFromUsePreSubstitution, createAndInitQualifierDefaults, createCFGVisualizer, createContractsFromMethod, createDefaultForTypeAnnotator, createDefaultForUseTypeAnnotator, createDependentTypesHelper, createFlowTransferFunction, createQualifierDefaults, createQualifierPolymorphism, createRequiresOrEnsuresQualifier, createTreeAnnotator, createTypeAnnotator, getAnnotatedTypeLhs, 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, getRegularStore, getReturnStatementStores, getSharedCFGForTree, getShouldDefaultTypeVarLocals, getSortedQualifierNames, getStoreAfter, getStoreAfter, getStoreBefore, getStoreBefore, getSupportedMonotonicTypeQualifiers, getTypeFactoryOfSubchecker, getTypeFactoryOfSubcheckerOrNull, handleCFGViz, irrelevantExtraMessage, isIgnoredExceptionType, isRelevant, isRelevant, isRelevantImpl, isUnreachable, methodFromUsePreSubstitution, parseJavaExpressionString, performFlowAnalysisForClass, performFlowAnalysisForClassOnce, postAnalyze, postAsMemberOf, postCFGConstruction, 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, checkInvalidOptionsInferSignatures, compoundAssignmentTreeArgTypes, constructorFromUse, constructorFromUseWithoutTypeArgInference, containsCapturedTypes, containsSameByClass, createAnnotatedTypeFormatter, createAnnotationClassLoader, createAnnotationFormatter, createQualifierHierarchy, createQualifierUpperBounds, 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, getRecordedLambdaParameterType, getResultingTypeOfConstructorMemberReference, getSelfType, getSideEffectsOnlyExpressionMap, getSideEffectsOnlyExpressions, getStringType, getSupportedTypeQualifierNames, getSupportedTypeQualifiers, getTreeUtils, getTypeArgumentInference, getTypeDeclarationBounds, getTypeHierarchy, getTypeOfExtendsImplements, getTypeVarSubstitutor, getUnboxedType, getVisitorTreePath, getWholeProgramInference, getWidenedAnnotations, getWidenedType, getWidenedType, hasDoesNotUnrefineReceiver, hasExplicitNoQualifierParameterInHierarchy, hasExplicitQualifierParameterInHierarchy, hasQualifierParameterInHierarchy, hasQualifierParameterInHierarchy, initializeAtm, initializeReflectionResolution, isAliasedTypeAnnotation, isDeclAnnotationWrittenOn, isDeterministic, isFromByteCode, isFromStubFile, isImmutable, isParsingAnnotationFiles, isSideEffectFree, isSupportedQualifier, isSupportedQualifier, isSupportedQualifier, isTop, isWithinConstructor, logGat, makeConditionConsistentWithOtherMethod, mergeAnnotationFileAnnosIntoType, methodFromUse, methodFromUse, methodFromUse, methodFromUseWithoutTypeArgInference, methodFromUseWithoutTypeArgInference, negateConstant, order, parseAnnotationFiles, postProcessClassTree, recordLambdaParameterType, replaceAnnotations, replaceAnnotations, setEnclosingElementForArtificialTree, setVisitorTreePath, shouldWarnIfStubRedundantWithBytecode, toAnnotatedType, toString, type, wpiAdjustForUpdateField, wpiAdjustForUpdateNonField, wpiPrepareMethodForWriting, wpiPrepareMethodForWriting, wpiShouldInferFromNullAssignments, wpiShouldInferTypesForReceivers
-
Constructor Details
-
SeqGrowAnnotatedTypeFactory
Creates a SeqGrowAnnotatedTypeFactory.- Parameters:
checker- the associated type-checker
-
-
Method Details
-
typeLacksCapability
Only sequenced collections and sequenced maps have sequenced-grow methods, so@Modifiableand@Unmodifiablemake no claim about any other type. This is an allowlist, unlike the blocklists of the other capabilities.On JDKs before Java 21,
SequencedCollectionandSequencedMapare not present, butDequestill has first/last insertion methods.- Overrides:
typeLacksCapabilityin classModifiabilityBaseAnnotatedTypeFactory- Parameters:
type- the type on which an alias was written; it is an upper bound, so it is never a type variable or a wildcard, andModifiabilityBaseAnnotatedTypeFactory.lacksCapability(javax.lang.model.type.TypeMirror, java.util.function.Predicate<javax.lang.model.type.TypeMirror>)has already decomposed intersection types, so it is never an intersection type either- Returns:
- true if
typestructurally cannot support this checker's capability
-
typesWithCapability
Description copied from class:ModifiabilityBaseAnnotatedTypeFactoryReturns erased types whose every subtype has this checker's capability, unlessModifiabilityBaseAnnotatedTypeFactory.typeLacksCapability(javax.lang.model.type.TypeMirror)holds of the subtype. For example, the Replace Checker's result includesList.A type variable or wildcard may be instantiated by any subtype of its upper bound, including a subtype that also implements an unrelated interface. For example, a type variable whose upper bound is
AbstractCollectionorSerializablemay be instantiated byHashSet, which cannot be replaced into. So an alias written on a type variable claims this checker's capability only if the upper bound is a subtype of one of these types.- Specified by:
typesWithCapabilityin classModifiabilityBaseAnnotatedTypeFactory- Returns:
- erased types whose subtypes have this checker's capability
-
polyLacksCapability
ForMap.Entry, only the replace bit is meaningful to carry from the map receiver, so the sequenced-grow bit of@PolyModifiableis@MaybeSeqGrowable.- Overrides:
polyLacksCapabilityin classModifiabilityBaseAnnotatedTypeFactory- Parameters:
type- the type on which@PolyModifiablewas written; it is an upper bound, so it is never a type variable or a wildcard, andModifiabilityBaseAnnotatedTypeFactory.lacksCapability(javax.lang.model.type.TypeMirror, java.util.function.Predicate<javax.lang.model.type.TypeMirror>)has already decomposed intersection types, so it is never an intersection type either- Returns:
- true if
@PolyModifiableweakens to the top qualifier ontype
-