Class StructuralEqualityVisitHistory

java.lang.Object
org.checkerframework.framework.type.StructuralEqualityVisitHistory

public class StructuralEqualityVisitHistory extends Object
Stores the result of StructuralEqualityComparer for type arguments.

This is similar to SubtypeVisitHistory, but both true and false results are stored.

  • Constructor Details

    • StructuralEqualityVisitHistory

      public StructuralEqualityVisitHistory()
      Creates an empty StructuralEqualityVisitHistory.
  • Method Details

    • put

      public void put(AnnotatedTypeMirror type1, AnnotatedTypeMirror type2, AnnotationMirror hierarchy, boolean result)
      Put result of comparing type1 and type2 for structural equality for the given hierarchy.
      Parameters:
      type1 - the first type
      type2 - the second type
      hierarchy - the top of the relevant type hierarchy; only annotations from that hierarchy are considered
      result - whether type1 is structurally equal to type2
    • get

      Return whether or not the two types are structurally equal for the given hierarchy or null if the types have not been visited for the given hierarchy.
      Parameters:
      type1 - the first type
      type2 - the second type
      hierarchy - the top of the relevant type hierarchy; only annotations from that hierarchy are considered
      Returns:
      whether or not the two types are structurally equal for the given hierarchy or null if the types have not been visited for the given hierarchy
    • remove

      public void remove(AnnotatedTypeMirror type1, AnnotatedTypeMirror type2, AnnotationMirror hierarchy)
      Remove the result of comparing type1 and type2 for structural equality for the given hierarchy.
      Parameters:
      type1 - the first type
      type2 - the second type
      hierarchy - the top of the relevant type hierarchy; only annotations from that hierarchy are considered