public abstract class AnnotatedTypeComparer<R> extends AnnotatedTypeScanner<R,AnnotatedTypeMirror>
AnnotatedTypeScanner
visitedNodes
Constructor and Description |
---|
AnnotatedTypeComparer() |
reset, scan, visit, visit, visitNoType, visitNull, visitPrimitive
protected abstract R compare(AnnotatedTypeMirror type, AnnotatedTypeMirror p)
protected abstract R combineRs(R r1, R r2)
protected R scan(Iterable<? extends AnnotatedTypeMirror> types, Iterable<? extends AnnotatedTypeMirror> p)
protected R reduce(R r1, R r2)
reduce
in class AnnotatedTypeScanner<R,AnnotatedTypeMirror>
protected R scanAndReduce(Iterable<? extends AnnotatedTypeMirror> types, Iterable<? extends AnnotatedTypeMirror> p, R r)
scan(java.lang.Iterable<? extends org.checkerframework.framework.type.AnnotatedTypeMirror>, java.lang.Iterable<? extends org.checkerframework.framework.type.AnnotatedTypeMirror>)
on types and p, then run reduce(R, R)
on the result (plus r) to return a
single element.public R scanAndReduce(AnnotatedTypeMirror type, AnnotatedTypeMirror p, R r)
scanAndReduce
in class AnnotatedTypeScanner<R,AnnotatedTypeMirror>
protected R scanAndReduce(Iterable<? extends AnnotatedTypeMirror> types, AnnotatedTypeMirror p, R r)
scanAndReduce
in class AnnotatedTypeScanner<R,AnnotatedTypeMirror>
protected R scan(AnnotatedTypeMirror type, AnnotatedTypeMirror p)
AnnotatedTypeScanner
scan
in class AnnotatedTypeScanner<R,AnnotatedTypeMirror>
type
public final R visitDeclared(AnnotatedTypeMirror.AnnotatedDeclaredType type, AnnotatedTypeMirror p)
AnnotatedTypeVisitor
visitDeclared
in interface AnnotatedTypeVisitor<R,AnnotatedTypeMirror>
visitDeclared
in class AnnotatedTypeScanner<R,AnnotatedTypeMirror>
type
- the type to visitp
- a visitor-specified parameterpublic final R visitArray(AnnotatedTypeMirror.AnnotatedArrayType type, AnnotatedTypeMirror p)
AnnotatedTypeVisitor
visitArray
in interface AnnotatedTypeVisitor<R,AnnotatedTypeMirror>
visitArray
in class AnnotatedTypeScanner<R,AnnotatedTypeMirror>
type
- the type to visitp
- a visitor-specified parameterpublic final R visitExecutable(AnnotatedTypeMirror.AnnotatedExecutableType type, AnnotatedTypeMirror p)
AnnotatedTypeVisitor
visitExecutable
in interface AnnotatedTypeVisitor<R,AnnotatedTypeMirror>
visitExecutable
in class AnnotatedTypeScanner<R,AnnotatedTypeMirror>
type
- the type to visitp
- a visitor-specified parameterpublic R visitTypeVariable(AnnotatedTypeMirror.AnnotatedTypeVariable type, AnnotatedTypeMirror p)
AnnotatedTypeVisitor
visitTypeVariable
in interface AnnotatedTypeVisitor<R,AnnotatedTypeMirror>
visitTypeVariable
in class AnnotatedTypeScanner<R,AnnotatedTypeMirror>
type
- the type to visitp
- a visitor-specified parameterpublic R visitWildcard(AnnotatedTypeMirror.AnnotatedWildcardType type, AnnotatedTypeMirror p)
AnnotatedTypeVisitor
visitWildcard
in interface AnnotatedTypeVisitor<R,AnnotatedTypeMirror>
visitWildcard
in class AnnotatedTypeScanner<R,AnnotatedTypeMirror>
type
- the type to visitp
- a visitor-specified parameterpublic R visitIntersection(AnnotatedTypeMirror.AnnotatedIntersectionType type, AnnotatedTypeMirror p)
AnnotatedTypeVisitor
visitIntersection
in interface AnnotatedTypeVisitor<R,AnnotatedTypeMirror>
visitIntersection
in class AnnotatedTypeScanner<R,AnnotatedTypeMirror>
type
- the type to visitp
- a visitor-specified parameterpublic R visitUnion(AnnotatedTypeMirror.AnnotatedUnionType type, AnnotatedTypeMirror p)
AnnotatedTypeVisitor
visitUnion
in interface AnnotatedTypeVisitor<R,AnnotatedTypeMirror>
visitUnion
in class AnnotatedTypeScanner<R,AnnotatedTypeMirror>
type
- the type to visitp
- a visitor-specified parameter