checkers.types.visitors
Interface AnnotatedTypeVisitor<R,P>

All Known Implementing Classes:
AnnotatedTypeComparer, AnnotatedTypeScanner, SimpleAnnotatedTypeScanner, SimpleAnnotatedTypeVisitor, TypeAnnotator

public interface AnnotatedTypeVisitor<R,P>

A Visitor class of annotated types, in the style of the visitor design pattern. A visitor of types, in the style of the visitor design pattern. Classes implementing this interface are used to operate on a type when the kind of type is unknown at compile time. When a visitor is passed to a type's accept method, the visitXYZ method most applicable to that type is invoked. Classes implementing this interface may or may not throw a NullPointerException if the additional parameter p is null; see documentation of the implementing class for details.


Method Summary
 R visit(AnnotatedTypeMirror type)
          A Convenience method equivalent to v.visit(t, null).
 R visit(AnnotatedTypeMirror type, P p)
          Visits a type.
 R visitArray(AnnotatedTypeMirror.AnnotatedArrayType type, P p)
          Visits an array type.
 R visitDeclared(AnnotatedTypeMirror.AnnotatedDeclaredType type, P p)
          Visits a declared type.
 R visitExecutable(AnnotatedTypeMirror.AnnotatedExecutableType type, P p)
          Visits an executable type.
 R visitNoType(AnnotatedTypeMirror.AnnotatedNoType type, P p)
          Visits NoType type.
 R visitNull(AnnotatedTypeMirror.AnnotatedNullType type, P p)
          Visits a null type.
 R visitPrimitive(AnnotatedTypeMirror.AnnotatedPrimitiveType type, P p)
          Visits a primitive type.
 R visitTypeVariable(AnnotatedTypeMirror.AnnotatedTypeVariable type, P p)
          Visits a type variable.
 R visitWildcard(AnnotatedTypeMirror.AnnotatedWildcardType type, P p)
          Visits a wildcard type.
 

Method Detail

visit

R visit(AnnotatedTypeMirror type)
A Convenience method equivalent to v.visit(t, null).

Parameters:
type - the type to visit
Returns:
a visitor-specified result

visit

R visit(AnnotatedTypeMirror type,
        P p)
Visits a type.

Parameters:
type - the type to visit
p - a visitor-specified parameter
Returns:
a visitor-specified result

visitDeclared

R visitDeclared(AnnotatedTypeMirror.AnnotatedDeclaredType type,
                P p)
Visits a declared type.

Parameters:
type - the type to visit
p - a visitor-specified parameter
Returns:
a visitor-specified result

visitExecutable

R visitExecutable(AnnotatedTypeMirror.AnnotatedExecutableType type,
                  P p)
Visits an executable type.

Parameters:
type - the type to visit
p - a visitor-specified parameter
Returns:
a visitor-specified result

visitArray

R visitArray(AnnotatedTypeMirror.AnnotatedArrayType type,
             P p)
Visits an array type.

Parameters:
type - the type to visit
p - a visitor-specified parameter
Returns:
a visitor-specified result

visitTypeVariable

R visitTypeVariable(AnnotatedTypeMirror.AnnotatedTypeVariable type,
                    P p)
Visits a type variable.

Parameters:
type - the type to visit
p - a visitor-specified parameter
Returns:
a visitor-specified result

visitPrimitive

R visitPrimitive(AnnotatedTypeMirror.AnnotatedPrimitiveType type,
                 P p)
Visits a primitive type.

Parameters:
type - the type to visit
p - a visitor-specified parameter
Returns:
a visitor-specified result

visitNoType

R visitNoType(AnnotatedTypeMirror.AnnotatedNoType type,
              P p)
Visits NoType type.

Parameters:
type - the type to visit
p - a visitor-specified parameter
Returns:
a visitor-specified result

visitNull

R visitNull(AnnotatedTypeMirror.AnnotatedNullType type,
            P p)
Visits a null type.

Parameters:
type - the type to visit
p - a visitor-specified parameter
Returns:
a visitor-specified result

visitWildcard

R visitWildcard(AnnotatedTypeMirror.AnnotatedWildcardType type,
                P p)
Visits a wildcard type.

Parameters:
type - the type to visit
p - a visitor-specified parameter
Returns:
a visitor-specified result