Class StructuralEqualityVisitHistory
java.lang.Object
org.checkerframework.framework.type.StructuralEqualityVisitHistory
Stores the result of
StructuralEqualityComparer
for type arguments.
This is similar to SubtypeVisitHistory
, but both true and false results are stored.
-
Constructor Summary
ConstructorDescriptionCreates an empty StructuralEqualityVisitHistory. -
Method Summary
Modifier and TypeMethodDescriptionget
(AnnotatedTypeMirror type1, AnnotatedTypeMirror type2, AnnotationMirror hierarchy) Return whether or not the two types are structurally equal for the given hierarchy ornull
if the types have not been visited for the given hierarchy.void
put
(AnnotatedTypeMirror type1, AnnotatedTypeMirror type2, AnnotationMirror hierarchy, boolean result) Put result of comparingtype1
andtype2
for structural equality for the given hierarchy.void
remove
(AnnotatedTypeMirror type1, AnnotatedTypeMirror type2, AnnotationMirror hierarchy) Remove the result of comparingtype1
andtype2
for structural equality for the given hierarchy.
-
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 comparingtype1
andtype2
for structural equality for the given hierarchy.- Parameters:
type1
- the first typetype2
- the second typehierarchy
- the top of the relevant type hierarchy; only annotations from that hierarchy are consideredresult
- whethertype1
is structurally equal totype2
-
get
public @Nullable Boolean get(AnnotatedTypeMirror type1, AnnotatedTypeMirror type2, AnnotationMirror hierarchy) Return whether or not the two types are structurally equal for the given hierarchy ornull
if the types have not been visited for the given hierarchy.- Parameters:
type1
- the first typetype2
- the second typehierarchy
- 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 comparingtype1
andtype2
for structural equality for the given hierarchy.- Parameters:
type1
- the first typetype2
- the second typehierarchy
- the top of the relevant type hierarchy; only annotations from that hierarchy are considered
-