checkers.types.visitors
Class SimpleAnnotatedTypeVisitor<R,P>

java.lang.Object
  extended by checkers.types.visitors.SimpleAnnotatedTypeVisitor<R,P>
Type Parameters:
R - The return type of this visitor's methods. Use Void for visitors that do not need to return results.
P - the type of the additional parameter to this visitor's methods. Use Void for visitors that do not need an additional parameter.
All Implemented Interfaces:
AnnotatedTypeVisitor<R,P>

public class SimpleAnnotatedTypeVisitor<R,P>
extends Object
implements AnnotatedTypeVisitor<R,P>

A simple visitor for AnnotatedTypeMirrors.


Field Summary
protected  R DEFAULT_VALUE
          The default value to return as a default action
 
Constructor Summary
SimpleAnnotatedTypeVisitor()
          Creates an instance of SimpleAnnotatedTypeVisitor with default value being null
SimpleAnnotatedTypeVisitor(R defaultValue)
          Creates an instance of SimpleAnnotatedTypeVisitor with the default value being the passed defaultValue
 
Method Summary
protected  R defaultAction(AnnotatedTypeMirror type, P p)
          Performs the default action for visiting trees, if subclasses do not override the visitFOO node.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_VALUE

protected final R DEFAULT_VALUE
The default value to return as a default action

Constructor Detail

SimpleAnnotatedTypeVisitor

public SimpleAnnotatedTypeVisitor()
Creates an instance of SimpleAnnotatedTypeVisitor with default value being null


SimpleAnnotatedTypeVisitor

public SimpleAnnotatedTypeVisitor(R defaultValue)
Creates an instance of SimpleAnnotatedTypeVisitor with the default value being the passed defaultValue

Parameters:
defaultValue - the default value this class should return
Method Detail

defaultAction

protected R defaultAction(AnnotatedTypeMirror type,
                          P p)
Performs the default action for visiting trees, if subclasses do not override the visitFOO node. This implementation merely returns the default value (as specified by the protected field DEFAULT_VALUE).


visit

public R visit(AnnotatedTypeMirror type)
Description copied from interface: AnnotatedTypeVisitor
A Convenience method equivalent to v.visit(t, null).

Specified by:
visit in interface AnnotatedTypeVisitor<R,P>
Parameters:
type - the type to visit
Returns:
a visitor-specified result

visit

public R visit(AnnotatedTypeMirror type,
               P p)
Description copied from interface: AnnotatedTypeVisitor
Visits a type.

Specified by:
visit in interface AnnotatedTypeVisitor<R,P>
Parameters:
type - the type to visit
p - a visitor-specified parameter
Returns:
a visitor-specified result

visitDeclared

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

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

visitArray

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

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

visitExecutable

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

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

visitTypeVariable

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

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

visitWildcard

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

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

visitPrimitive

public R visitPrimitive(AnnotatedTypeMirror.AnnotatedPrimitiveType type,
                        P p)
Description copied from interface: AnnotatedTypeVisitor
Visits a primitive type.

Specified by:
visitPrimitive in interface AnnotatedTypeVisitor<R,P>
Parameters:
type - the type to visit
p - a visitor-specified parameter
Returns:
a visitor-specified result

visitNull

public R visitNull(AnnotatedTypeMirror.AnnotatedNullType type,
                   P p)
Description copied from interface: AnnotatedTypeVisitor
Visits a null type.

Specified by:
visitNull in interface AnnotatedTypeVisitor<R,P>
Parameters:
type - the type to visit
p - a visitor-specified parameter
Returns:
a visitor-specified result

visitNoType

public R visitNoType(AnnotatedTypeMirror.AnnotatedNoType type,
                     P p)
Description copied from interface: AnnotatedTypeVisitor
Visits NoType type.

Specified by:
visitNoType in interface AnnotatedTypeVisitor<R,P>
Parameters:
type - the type to visit
p - a visitor-specified parameter
Returns:
a visitor-specified result