Class InitializationAnnotatedTypeFactory.InitializationQualifierHierarchy

Direct Known Subclasses:
NullnessAnnotatedTypeFactory.NullnessQualifierHierarchy
Enclosing class:
InitializationAnnotatedTypeFactory<Value extends CFAbstractValue<Value>,Store extends InitializationStore<Value,Store>,Transfer extends InitializationTransfer<Value,Transfer,Store>,Flow extends CFAbstractAnalysis<Value,Store,Transfer>>

protected abstract class InitializationAnnotatedTypeFactory.InitializationQualifierHierarchy extends MostlyNoElementQualifierHierarchy
  • Constructor Details

    • InitializationQualifierHierarchy

      protected InitializationQualifierHierarchy()
      Create an InitializationQualifierHierarchy.
  • Method Details

    • isSubtypeInitialization

      public boolean isSubtypeInitialization(AnnotationMirror subAnno, QualifierKind subKind, AnnotationMirror superAnno, QualifierKind superKind)
      Subtype testing for initialization annotations. Will return false if either qualifier is not an initialization annotation. Subclasses should override isSubtype and call this method for initialization qualifiers.
      Parameters:
      subAnno - subtype annotation
      subKind - subtype kind
      superAnno - supertype annotation
      superKind - supertype kind
      Returns:
      true if subAnno is a subtype of superAnno in the initialization hierarchy
    • leastUpperBoundInitialization

      protected AnnotationMirror leastUpperBoundInitialization(AnnotationMirror anno1, QualifierKind qual1, AnnotationMirror anno2, QualifierKind qual2)
      Compute the least upper bound of two initialization qualifiers. Returns null if one of the qualifiers is not in the initialization hierarachy. Subclasses should override leastUpperBound and call this method for initialization qualifiers.
      Parameters:
      anno1 - an initialization qualifier
      qual1 - a qualifier kind
      anno2 - an initialization qualifier
      qual2 - a qualifier kind
      Returns:
      the lub of anno1 and anno2
    • lubTypeFrame

      protected TypeMirror lubTypeFrame(TypeMirror a, TypeMirror b)
      Returns the least upper bound of two Java basetypes (without annotations).
      Parameters:
      a - the first argument
      b - the second argument
      Returns:
      the lub of the two arguments
    • greatestLowerBoundInitialization

      protected @Nullable AnnotationMirror greatestLowerBoundInitialization(AnnotationMirror anno1, QualifierKind qual1, AnnotationMirror anno2, QualifierKind qual2)
      Compute the greatest lower bound of two initialization qualifiers. Returns null if one of the qualifiers is not in the initialization hierarachy. Subclasses should override greatestLowerBound and call this method for initialization qualifiers.
      Parameters:
      anno1 - an initialization qualifier
      qual1 - a qualifier kind
      anno2 - an initialization qualifier
      qual2 - a qualifier kind
      Returns:
      the glb of anno1 and anno2