Class IteratorAnnotatedTypeFactory
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.iterator.IteratorAnnotatedTypeFactory
- All Implemented Interfaces:
AnnotationProvider
The annotated type factory for the
IteratorChecker.-
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 an IteratorAnnotatedTypeFactory. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanReturns true if this checker's hierarchy is one of the capabilities that the whole-modifiability aliases (@Modifiable,@Unmodifiable,@MaybeModifiable,@UnmodifiableParam, and@PolyModifiable) expand into.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, hasNegativeCapability, methodFromUse, negativeCapability, polyCapability, polyLacksCapability, positiveCapability, refinedIteratorResultBound, refineIteratorReturnType, refineReturnTypeForPreservesModifiability, topAnnotation, typeLacksCapabilityMethods 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
-
IteratorAnnotatedTypeFactory
Creates an IteratorAnnotatedTypeFactory.- Parameters:
checker- the associated type-checker
-
-
Method Details
-
expandsModifiabilityAliases
protected boolean expandsModifiabilityAliases()Description copied from class:ModifiabilityBaseAnnotatedTypeFactoryReturns true if this checker's hierarchy is one of the capabilities that the whole-modifiability aliases (@Modifiable,@Unmodifiable,@MaybeModifiable,@UnmodifiableParam, and@PolyModifiable) expand into. The Iterator hierarchy is not: it states what a collection's iterator preserves rather than whether a mutating method throwsUnsupportedOperationException.- Overrides:
expandsModifiabilityAliasesin classModifiabilityBaseAnnotatedTypeFactory- Returns:
- true if the whole-modifiability aliases expand into this checker's hierarchy
-
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
-