Class CFAbstractValue.ValueGlb
java.lang.Object
CFAbstractValue<V>.org.checkerframework.framework.flow.CFAbstractValue.AnnotationSetCombiner
org.checkerframework.framework.flow.CFAbstractValue.ValueGlb
- Enclosing class:
CFAbstractValue<V extends CFAbstractValue<V>>
Computes the GLB of two sets of annotations. The computation accounts for sets that are missing
annotations in hierarchies.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected @Nullable AnnotationMirrorcombineAnnotationWithTypeVar(AnnotationMirror annotation, AnnotatedTypeMirror.AnnotatedTypeVariable typeVar, AnnotationMirror top, boolean canCombinedSetBeMissingAnnos) Returns the result of combiningannotationwithtypeVar.protected @Nullable AnnotationMirrorcombineTwoAnnotations(AnnotationMirror a, TypeMirror aTypeMirror, AnnotationMirror b, TypeMirror bTypeMirror, AnnotationMirror top) Returns the result of combining the two annotations.protected @Nullable AnnotationMirrorcombineTwoTypeVarsUsingExtendsBounds(AnnotatedTypeMirror.AnnotatedTypeVariable aAtv, AnnotatedTypeMirror.AnnotatedTypeVariable bAtv, AnnotationMirror top) Returns the primary annotation that result from of combining the twoAnnotatedTypeMirror.AnnotatedTypeVariablethat do not have primary annotations.Methods inherited from class org.checkerframework.framework.flow.CFAbstractValue.AnnotationSetCombiner
combineSets
-
Constructor Details
-
ValueGlb
protected ValueGlb()
-
-
Method Details
-
combineTwoAnnotations
protected @Nullable AnnotationMirror combineTwoAnnotations(AnnotationMirror a, TypeMirror aTypeMirror, AnnotationMirror b, TypeMirror bTypeMirror, AnnotationMirror top) Description copied from class:CFAbstractValue.AnnotationSetCombinerReturns the result of combining the two annotations. This method is called when an annotation exists in both sets for the hierarchy whose top istop.- Specified by:
combineTwoAnnotationsin classCFAbstractValue<V extends CFAbstractValue<V>>.AnnotationSetCombiner- Parameters:
a- an annotation in the hierarchyaTypeMirror- the type that is annotated byab- an annotation in the hierarchybTypeMirror- the type that is annotated bybtop- the top annotation in the hierarchy- Returns:
- the result of combining the two annotations or null if no combination exists
-
combineTwoTypeVarsUsingExtendsBounds
protected @Nullable AnnotationMirror combineTwoTypeVarsUsingExtendsBounds(AnnotatedTypeMirror.AnnotatedTypeVariable aAtv, AnnotatedTypeMirror.AnnotatedTypeVariable bAtv, AnnotationMirror top) Description copied from class:CFAbstractValue.AnnotationSetCombinerReturns the primary annotation that result from of combining the twoAnnotatedTypeMirror.AnnotatedTypeVariablethat do not have primary annotations.- Specified by:
combineTwoTypeVarsUsingExtendsBoundsin classCFAbstractValue<V extends CFAbstractValue<V>>.AnnotationSetCombiner- Parameters:
aAtv- a type variable that does not have a primary annotation intophierarchybAtv- a type variable that does not have a primary annotation intophierarchytop- the top annotation in the hierarchy- Returns:
- the result of combining the two type variables, which may be null
-
combineAnnotationWithTypeVar
protected @Nullable AnnotationMirror combineAnnotationWithTypeVar(AnnotationMirror annotation, AnnotatedTypeMirror.AnnotatedTypeVariable typeVar, AnnotationMirror top, boolean canCombinedSetBeMissingAnnos) Description copied from class:CFAbstractValue.AnnotationSetCombinerReturns the result of combiningannotationwithtypeVar.This is called when an annotation exists for the hierarchy in one set, but not the other.
- Specified by:
combineAnnotationWithTypeVarin classCFAbstractValue<V extends CFAbstractValue<V>>.AnnotationSetCombiner- Parameters:
annotation- an annotationtypeVar- a type variable that does not have a primary annotation in the hierarchytop- the top annotation of the hierarchycanCombinedSetBeMissingAnnos- true if the combined set can be missing annotations- Returns:
- the result of combining
annotationwithtypeVar
-