public class StructuralEqualityVisitHistory extends Object
StructuralEqualityComparer
for type arguments.
This is similar to SubtypeVisitHistory
, but both true and false results are stored.
Constructor and Description |
---|
StructuralEqualityVisitHistory()
Creates an empty StructuralEqualityVisitHistory.
|
Modifier and Type | Method and Description |
---|---|
@Nullable Boolean |
get(AnnotatedTypeMirror type1,
AnnotatedTypeMirror type2,
AnnotationMirror hierarchy)
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. |
void |
put(AnnotatedTypeMirror type1,
AnnotatedTypeMirror type2,
AnnotationMirror hierarchy,
boolean result)
Put result of comparing
type1 and type2 for structural equality for the given
hierarchy. |
public StructuralEqualityVisitHistory()
public void put(AnnotatedTypeMirror type1, AnnotatedTypeMirror type2, AnnotationMirror hierarchy, boolean result)
type1
and type2
for structural equality for the given
hierarchy.type1
- the first typetype2
- the second typehierarchy
- the top of the relevant type hierarchy; only annotations from that hierarchy
are consideredresult
- whether type1
is structurally equal to type2
public @Nullable Boolean get(AnnotatedTypeMirror type1, AnnotatedTypeMirror type2, AnnotationMirror hierarchy)
null
if the types have not been visited for the given hierarchy.type1
- the first typetype2
- the second typehierarchy
- the top of the relevant type hierarchy; only annotations from that hierarchy
are considerednull
if the types have not been visited for the given hierarchy