Class CFAbstractValue.AnnotationSetCombiner

java.lang.Object
org.checkerframework.framework.flow.CFAbstractValue.AnnotationSetCombiner
Direct Known Subclasses:
CFAbstractValue.ValueGlb, CFAbstractValue.ValueLub
Enclosing class:
CFAbstractValue<V extends CFAbstractValue<V>>

protected abstract class CFAbstractValue.AnnotationSetCombiner extends Object
  • Constructor Details

    • AnnotationSetCombiner

      protected AnnotationSetCombiner()
  • Method Details

    • combineSets

      protected AnnotationMirrorSet combineSets(TypeMirror aTypeMirror, AnnotationMirrorSet aSet, TypeMirror bTypeMirror, AnnotationMirrorSet bSet, boolean canCombinedSetBeMissingAnnos)
      Combines the two sets.
      Parameters:
      aTypeMirror - the type mirror associated with aSet
      aSet - a set of annotation mirrors
      bTypeMirror - the type mirror associated with bSet
      bSet - a set of annotation mirrors
      canCombinedSetBeMissingAnnos - whether or not the combined set can be missing annotations
      Returns:
      the combined sets
    • combineTwoAnnotations

      protected abstract @Nullable AnnotationMirror combineTwoAnnotations(AnnotationMirror a, TypeMirror aTypeMirror, AnnotationMirror b, TypeMirror bTypeMirror, AnnotationMirror top)
      Returns the result of combining the two annotations. This method is called when an annotation exists in both sets for the hierarchy whose top is top.
      Parameters:
      a - an annotation in the hierarchy
      aTypeMirror - the type that is annotated by a
      b - an annotation in the hierarchy
      bTypeMirror - the type that is annotated by b
      top - the top annotation in the hierarchy
      Returns:
      the result of combining the two annotations or null if no combination exists
    • combineTwoTypeVars

      protected abstract @Nullable AnnotationMirror combineTwoTypeVars(AnnotatedTypeMirror.AnnotatedTypeVariable aAtv, AnnotatedTypeMirror.AnnotatedTypeVariable bAtv, AnnotationMirror top, boolean canCombinedSetBeMissingAnnos)
      Returns the primary annotation that result from of combining the two AnnotatedTypeMirror.AnnotatedTypeVariable. If the result has no primary annotation, null is returned. This method is called when no annotation exists in either sets for the hierarchy whose top is top.
      Parameters:
      aAtv - a type variable that does not have a primary annotation in top hierarchy
      bAtv - a type variable that does not have a primary annotation in top hierarchy
      top - the top annotation in the hierarchy
      canCombinedSetBeMissingAnnos - whether or not
      Returns:
      the result of combining the two type variables, which may be null
    • combineAnnotationWithTypeVar

      protected abstract @Nullable AnnotationMirror combineAnnotationWithTypeVar(AnnotationMirror annotation, AnnotatedTypeMirror.AnnotatedTypeVariable typeVar, AnnotationMirror top, boolean canCombinedSetBeMissingAnnos)
      Returns the result of combining annotation with typeVar.

      This is called when an annotation exists for the hierarchy in one set, but not the other.

      Parameters:
      annotation - an annotation
      typeVar - a type variable that does not have a primary annotation in the hierarchy
      top - the top annotation of the hierarchy
      canCombinedSetBeMissingAnnos - whether or not
      Returns:
      the result of combining annotation with typeVar