checkers.types.visitors
Class AnnotatedTypeComparer<R>

java.lang.Object
  extended by checkers.types.visitors.AnnotatedTypeScanner<R,AnnotatedTypeMirror>
      extended by checkers.types.visitors.AnnotatedTypeComparer<R>
All Implemented Interfaces:
AnnotatedTypeVisitor<R,AnnotatedTypeMirror>

public class AnnotatedTypeComparer<R>
extends AnnotatedTypeScanner<R,AnnotatedTypeMirror>

A TypeVisitor that takes an AnnotatedTypeMirror as a parameter, and visits it simultaneously. Note that the parameter type must be assignable to the visited type, or an assertion fails when visiting an incompatible subtype.

See Also:
AnnotatedTypeScanner

Field Summary
Modifier and Type Field and Description
 
Fields inherited from class checkers.types.visitors.AnnotatedTypeScanner
visitedNodes
 
Constructor Summary
Constructor and Description
AnnotatedTypeComparer()
           
 
Method Summary
Modifier and Type Method and Description
protected  R scan(Iterable<? extends AnnotatedTypeMirror> types, Iterable<? extends AnnotatedTypeMirror> p)
           
 R scanAndReduce(AnnotatedTypeMirror type, AnnotatedTypeMirror p, R r)
           
protected  R scanAndReduce(Iterable<? extends AnnotatedTypeMirror> types, AnnotatedTypeMirror p, R r)
           
protected  R scanAndReduce(Iterable<? extends AnnotatedTypeMirror> types, Iterable<? extends AnnotatedTypeMirror> p, R r)
           
 R visitArray(AnnotatedTypeMirror.AnnotatedArrayType type, AnnotatedTypeMirror p)
          Visits an array type.
 R visitDeclared(AnnotatedTypeMirror.AnnotatedDeclaredType type, AnnotatedTypeMirror p)
          Visits a declared type.
 R visitExecutable(AnnotatedTypeMirror.AnnotatedExecutableType type, AnnotatedTypeMirror p)
          Visits an executable type.
 R visitTypeVariable(AnnotatedTypeMirror.AnnotatedTypeVariable type, AnnotatedTypeMirror p)
          Visits a type variable.
 R visitWildcard(AnnotatedTypeMirror.AnnotatedWildcardType type, AnnotatedTypeMirror p)
          Visits a wildcard type.
 
Methods inherited from class checkers.types.visitors.AnnotatedTypeScanner
reduce, scan, scan, visit, visit, visitNoType, visitNull, visitPrimitive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotatedTypeComparer

public AnnotatedTypeComparer()
Method Detail

scan

protected R scan(Iterable<? extends AnnotatedTypeMirror> types,
                 Iterable<? extends AnnotatedTypeMirror> p)

scanAndReduce

protected R scanAndReduce(Iterable<? extends AnnotatedTypeMirror> types,
                          Iterable<? extends AnnotatedTypeMirror> p,
                          R r)

scanAndReduce

public R scanAndReduce(AnnotatedTypeMirror type,
                       AnnotatedTypeMirror p,
                       R r)
Overrides:
scanAndReduce in class AnnotatedTypeScanner<R,AnnotatedTypeMirror>

scanAndReduce

protected R scanAndReduce(Iterable<? extends AnnotatedTypeMirror> types,
                          AnnotatedTypeMirror p,
                          R r)
Overrides:
scanAndReduce in class AnnotatedTypeScanner<R,AnnotatedTypeMirror>

visitDeclared

public final R visitDeclared(AnnotatedTypeMirror.AnnotatedDeclaredType type,
                             AnnotatedTypeMirror p)
Description copied from interface: AnnotatedTypeVisitor
Visits a declared type.

Specified by:
visitDeclared in interface AnnotatedTypeVisitor<R,AnnotatedTypeMirror>
Overrides:
visitDeclared in class AnnotatedTypeScanner<R,AnnotatedTypeMirror>
Parameters:
type - the type to visit
p - a visitor-specified parameter
Returns:
a visitor-specified result

visitArray

public final R visitArray(AnnotatedTypeMirror.AnnotatedArrayType type,
                          AnnotatedTypeMirror p)
Description copied from interface: AnnotatedTypeVisitor
Visits an array type.

Specified by:
visitArray in interface AnnotatedTypeVisitor<R,AnnotatedTypeMirror>
Overrides:
visitArray in class AnnotatedTypeScanner<R,AnnotatedTypeMirror>
Parameters:
type - the type to visit
p - a visitor-specified parameter
Returns:
a visitor-specified result

visitExecutable

public final R visitExecutable(AnnotatedTypeMirror.AnnotatedExecutableType type,
                               AnnotatedTypeMirror p)
Description copied from interface: AnnotatedTypeVisitor
Visits an executable type.

Specified by:
visitExecutable in interface AnnotatedTypeVisitor<R,AnnotatedTypeMirror>
Overrides:
visitExecutable in class AnnotatedTypeScanner<R,AnnotatedTypeMirror>
Parameters:
type - the type to visit
p - a visitor-specified parameter
Returns:
a visitor-specified result

visitTypeVariable

public R visitTypeVariable(AnnotatedTypeMirror.AnnotatedTypeVariable type,
                           AnnotatedTypeMirror p)
Description copied from interface: AnnotatedTypeVisitor
Visits a type variable.

Specified by:
visitTypeVariable in interface AnnotatedTypeVisitor<R,AnnotatedTypeMirror>
Overrides:
visitTypeVariable in class AnnotatedTypeScanner<R,AnnotatedTypeMirror>
Parameters:
type - the type to visit
p - a visitor-specified parameter
Returns:
a visitor-specified result

visitWildcard

public final R visitWildcard(AnnotatedTypeMirror.AnnotatedWildcardType type,
                             AnnotatedTypeMirror p)
Description copied from interface: AnnotatedTypeVisitor
Visits a wildcard type.

Specified by:
visitWildcard in interface AnnotatedTypeVisitor<R,AnnotatedTypeMirror>
Overrides:
visitWildcard in class AnnotatedTypeScanner<R,AnnotatedTypeMirror>
Parameters:
type - the type to visit
p - a visitor-specified parameter
Returns:
a visitor-specified result