Class EquivalentAtmComboScanner<RETURN_TYPE,PARAM>
java.lang.Object
org.checkerframework.framework.type.visitor.AbstractAtmComboVisitor<RETURN_TYPE,PARAM>
org.checkerframework.framework.type.visitor.EquivalentAtmComboScanner<RETURN_TYPE,PARAM>
- All Implemented Interfaces:
AtmComboVisitor<RETURN_TYPE,
PARAM>
- Direct Known Subclasses:
EqualityAtmComparer
public abstract class EquivalentAtmComboScanner<RETURN_TYPE,PARAM>
extends AbstractAtmComboVisitor<RETURN_TYPE,PARAM>
EquivalentAtmComboScanner is an AtmComboVisitor that accepts combinations that are identical in
TypeMirror structure but might differ in contained AnnotationMirrors. This method will scan the
individual components of the visited type pairs together.
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected class
A history of type pairs that have already been visited and the return type of their visit. -
Field Summary
Modifier and TypeFieldDescriptionprotected final EquivalentAtmComboScanner<RETURN_TYPE,
PARAM>.Visited A history of type pairs that have already been visited and the return type of their visit. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected RETURN_TYPE
reduce
(RETURN_TYPE r1, RETURN_TYPE r2) protected RETURN_TYPE
scan
(Iterable<? extends AnnotatedTypeMirror> types1, Iterable<? extends AnnotatedTypeMirror> types2, PARAM param) protected RETURN_TYPE
scan
(AnnotatedTypeMirror type1, AnnotatedTypeMirror type2, PARAM param) protected RETURN_TYPE
scanAndReduce
(Iterable<? extends AnnotatedTypeMirror> types1, Iterable<? extends AnnotatedTypeMirror> types2, PARAM param, RETURN_TYPE r) protected RETURN_TYPE
scanAndReduce
(AnnotatedTypeMirror type1, AnnotatedTypeMirror type2, PARAM param, RETURN_TYPE r) protected abstract RETURN_TYPE
scanWithNull
(AnnotatedTypeMirror type1, AnnotatedTypeMirror type2, PARAM param) In an AnnotatedTypeScanner a null type is encounter than null is returned.visit
(AnnotatedTypeMirror type1, AnnotatedTypeMirror type2, PARAM param) Entry point for this scanner.visitArray_Array
(AnnotatedTypeMirror.AnnotatedArrayType type1, AnnotatedTypeMirror.AnnotatedArrayType type2, PARAM param) visitDeclared_Declared
(AnnotatedTypeMirror.AnnotatedDeclaredType type1, AnnotatedTypeMirror.AnnotatedDeclaredType type2, PARAM param) visitExecutable_Executable
(AnnotatedTypeMirror.AnnotatedExecutableType type1, AnnotatedTypeMirror.AnnotatedExecutableType type2, PARAM param) visitIntersection_Intersection
(AnnotatedTypeMirror.AnnotatedIntersectionType type1, AnnotatedTypeMirror.AnnotatedIntersectionType type2, PARAM param) visitNone_None
(AnnotatedTypeMirror.AnnotatedNoType type1, AnnotatedTypeMirror.AnnotatedNoType type2, PARAM param) visitNull_Null
(AnnotatedTypeMirror.AnnotatedNullType type1, AnnotatedTypeMirror.AnnotatedNullType type2, PARAM param) visitPrimitive_Primitive
(AnnotatedTypeMirror.AnnotatedPrimitiveType type1, AnnotatedTypeMirror.AnnotatedPrimitiveType type2, PARAM param) visitTypevar_Typevar
(AnnotatedTypeMirror.AnnotatedTypeVariable type1, AnnotatedTypeMirror.AnnotatedTypeVariable type2, PARAM param) visitUnion_Union
(AnnotatedTypeMirror.AnnotatedUnionType type1, AnnotatedTypeMirror.AnnotatedUnionType type2, PARAM param) visitWildcard_Wildcard
(AnnotatedTypeMirror.AnnotatedWildcardType type1, AnnotatedTypeMirror.AnnotatedWildcardType type2, PARAM param) Methods inherited from class org.checkerframework.framework.type.visitor.AbstractAtmComboVisitor
visitArray_Declared, visitArray_Executable, visitArray_Intersection, visitArray_None, visitArray_Null, visitArray_Primitive, visitArray_Typevar, visitArray_Union, visitArray_Wildcard, visitDeclared_Array, visitDeclared_Executable, visitDeclared_Intersection, visitDeclared_None, visitDeclared_Null, visitDeclared_Primitive, visitDeclared_Typevar, visitDeclared_Union, visitDeclared_Wildcard, visitExecutable_Array, visitExecutable_Declared, visitExecutable_Intersection, visitExecutable_None, visitExecutable_Null, visitExecutable_Primitive, visitExecutable_Typevar, visitExecutable_Union, visitExecutable_Wildcard, visitIntersection_Array, visitIntersection_Declared, visitIntersection_Executable, visitIntersection_None, visitIntersection_Null, visitIntersection_Primitive, visitIntersection_Typevar, visitIntersection_Union, visitIntersection_Wildcard, visitNone_Array, visitNone_Declared, visitNone_Executable, visitNone_Intersection, visitNone_Null, visitNone_Primitive, visitNone_Union, visitNone_Wildcard, visitNull_Array, visitNull_Declared, visitNull_Executable, visitNull_Intersection, visitNull_None, visitNull_Primitive, visitNull_Typevar, visitNull_Union, visitNull_Wildcard, visitPrimitive_Array, visitPrimitive_Declared, visitPrimitive_Executable, visitPrimitive_Intersection, visitPrimitive_None, visitPrimitive_Null, visitPrimitive_Typevar, visitPrimitive_Union, visitPrimitive_Wildcard, visitTypevar_Array, visitTypevar_Declared, visitTypevar_Executable, visitTypevar_Intersection, visitTypevar_None, visitTypevar_Null, visitTypevar_Primitive, visitTypevar_Union, visitTypevar_Wildcard, visitUnion_Array, visitUnion_Declared, visitUnion_Executable, visitUnion_Intersection, visitUnion_None, visitUnion_Null, visitUnion_Primitive, visitUnion_Typevar, visitUnion_Wildcard, visitWildcard_Array, visitWildcard_Declared, visitWildcard_Executable, visitWildcard_Intersection, visitWildcard_None, visitWildcard_Null, visitWildcard_Primitive, visitWildcard_Typevar, visitWildcard_Union
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.checkerframework.framework.type.visitor.AtmComboVisitor
defaultAction, defaultErrorMessage
-
Field Details
-
visited
A history of type pairs that have already been visited and the return type of their visit.
-
-
Constructor Details
-
EquivalentAtmComboScanner
public EquivalentAtmComboScanner()
-
-
Method Details
-
visit
Entry point for this scanner.- Overrides:
visit
in classAbstractAtmComboVisitor<RETURN_TYPE,
PARAM> - Parameters:
type1
- the first type to visittype2
- the second type to visitparam
- a value passed to every visit method- Returns:
- the result of calling the more specific
visit*
method
-
scanWithNull
protected abstract RETURN_TYPE scanWithNull(AnnotatedTypeMirror type1, AnnotatedTypeMirror type2, PARAM param) In an AnnotatedTypeScanner a null type is encounter than null is returned. A user may want to customize the behavior of this scanner depending on whether or not one or both types is null.- Parameters:
type1
- a nullable AnnotatedTypeMirrortype2
- a nullable AnnotatedTypeMirrorparam
- the visitor param- Returns:
- a subclass specific return type/value
-
scan
-
scan
protected RETURN_TYPE scan(Iterable<? extends AnnotatedTypeMirror> types1, Iterable<? extends AnnotatedTypeMirror> types2, PARAM param) -
scanAndReduce
protected RETURN_TYPE scanAndReduce(Iterable<? extends AnnotatedTypeMirror> types1, Iterable<? extends AnnotatedTypeMirror> types2, PARAM param, RETURN_TYPE r) -
scanAndReduce
protected RETURN_TYPE scanAndReduce(AnnotatedTypeMirror type1, AnnotatedTypeMirror type2, PARAM param, RETURN_TYPE r) -
reduce
-
visitArray_Array
public RETURN_TYPE visitArray_Array(AnnotatedTypeMirror.AnnotatedArrayType type1, AnnotatedTypeMirror.AnnotatedArrayType type2, PARAM param) - Specified by:
visitArray_Array
in interfaceAtmComboVisitor<RETURN_TYPE,
PARAM> - Overrides:
visitArray_Array
in classAbstractAtmComboVisitor<RETURN_TYPE,
PARAM>
-
visitDeclared_Declared
public RETURN_TYPE visitDeclared_Declared(AnnotatedTypeMirror.AnnotatedDeclaredType type1, AnnotatedTypeMirror.AnnotatedDeclaredType type2, PARAM param) - Specified by:
visitDeclared_Declared
in interfaceAtmComboVisitor<RETURN_TYPE,
PARAM> - Overrides:
visitDeclared_Declared
in classAbstractAtmComboVisitor<RETURN_TYPE,
PARAM>
-
visitExecutable_Executable
public RETURN_TYPE visitExecutable_Executable(AnnotatedTypeMirror.AnnotatedExecutableType type1, AnnotatedTypeMirror.AnnotatedExecutableType type2, PARAM param) - Specified by:
visitExecutable_Executable
in interfaceAtmComboVisitor<RETURN_TYPE,
PARAM> - Overrides:
visitExecutable_Executable
in classAbstractAtmComboVisitor<RETURN_TYPE,
PARAM>
-
visitIntersection_Intersection
public RETURN_TYPE visitIntersection_Intersection(AnnotatedTypeMirror.AnnotatedIntersectionType type1, AnnotatedTypeMirror.AnnotatedIntersectionType type2, PARAM param) - Specified by:
visitIntersection_Intersection
in interfaceAtmComboVisitor<RETURN_TYPE,
PARAM> - Overrides:
visitIntersection_Intersection
in classAbstractAtmComboVisitor<RETURN_TYPE,
PARAM>
-
visitNone_None
public @Nullable RETURN_TYPE visitNone_None(AnnotatedTypeMirror.AnnotatedNoType type1, AnnotatedTypeMirror.AnnotatedNoType type2, PARAM param) - Specified by:
visitNone_None
in interfaceAtmComboVisitor<RETURN_TYPE,
PARAM> - Overrides:
visitNone_None
in classAbstractAtmComboVisitor<RETURN_TYPE,
PARAM>
-
visitNull_Null
public @Nullable RETURN_TYPE visitNull_Null(AnnotatedTypeMirror.AnnotatedNullType type1, AnnotatedTypeMirror.AnnotatedNullType type2, PARAM param) - Specified by:
visitNull_Null
in interfaceAtmComboVisitor<RETURN_TYPE,
PARAM> - Overrides:
visitNull_Null
in classAbstractAtmComboVisitor<RETURN_TYPE,
PARAM>
-
visitPrimitive_Primitive
public @Nullable RETURN_TYPE visitPrimitive_Primitive(AnnotatedTypeMirror.AnnotatedPrimitiveType type1, AnnotatedTypeMirror.AnnotatedPrimitiveType type2, PARAM param) - Specified by:
visitPrimitive_Primitive
in interfaceAtmComboVisitor<RETURN_TYPE,
PARAM> - Overrides:
visitPrimitive_Primitive
in classAbstractAtmComboVisitor<RETURN_TYPE,
PARAM>
-
visitUnion_Union
public RETURN_TYPE visitUnion_Union(AnnotatedTypeMirror.AnnotatedUnionType type1, AnnotatedTypeMirror.AnnotatedUnionType type2, PARAM param) - Specified by:
visitUnion_Union
in interfaceAtmComboVisitor<RETURN_TYPE,
PARAM> - Overrides:
visitUnion_Union
in classAbstractAtmComboVisitor<RETURN_TYPE,
PARAM>
-
visitTypevar_Typevar
public RETURN_TYPE visitTypevar_Typevar(AnnotatedTypeMirror.AnnotatedTypeVariable type1, AnnotatedTypeMirror.AnnotatedTypeVariable type2, PARAM param) - Specified by:
visitTypevar_Typevar
in interfaceAtmComboVisitor<RETURN_TYPE,
PARAM> - Overrides:
visitTypevar_Typevar
in classAbstractAtmComboVisitor<RETURN_TYPE,
PARAM>
-
visitWildcard_Wildcard
public RETURN_TYPE visitWildcard_Wildcard(AnnotatedTypeMirror.AnnotatedWildcardType type1, AnnotatedTypeMirror.AnnotatedWildcardType type2, PARAM param) - Specified by:
visitWildcard_Wildcard
in interfaceAtmComboVisitor<RETURN_TYPE,
PARAM> - Overrides:
visitWildcard_Wildcard
in classAbstractAtmComboVisitor<RETURN_TYPE,
PARAM>
-