com.sun.istack.tools
Class APTTypeVisitor<T,P>

java.lang.Object
  extended by com.sun.istack.tools.APTTypeVisitor<T,P>
Direct Known Subclasses:
MakeSafeTypeVisitor

public abstract class APTTypeVisitor<T,P>
extends java.lang.Object

Visitor that works on APT TypeMirror and computes a value.

This visitor takes a parameter 'P' so that visitor code can be made stateless.

Author:
Kohsuke Kawaguchi

Constructor Summary
APTTypeVisitor()
           
 
Method Summary
 T apply(TypeMirror type, P param)
           
protected abstract  T onArrayType(ArrayType type, P param)
           
protected abstract  T onClassType(ClassType type, P param)
           
protected abstract  T onInterfaceType(InterfaceType type, P param)
           
protected abstract  T onPrimitiveType(PrimitiveType type, P param)
           
protected abstract  T onTypeVariable(TypeVariable type, P param)
           
protected abstract  T onVoidType(VoidType type, P param)
           
protected abstract  T onWildcard(WildcardType type, P param)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

APTTypeVisitor

public APTTypeVisitor()
Method Detail

apply

public final T apply(TypeMirror type,
                     P param)

onPrimitiveType

protected abstract T onPrimitiveType(PrimitiveType type,
                                     P param)

onArrayType

protected abstract T onArrayType(ArrayType type,
                                 P param)

onClassType

protected abstract T onClassType(ClassType type,
                                 P param)

onInterfaceType

protected abstract T onInterfaceType(InterfaceType type,
                                     P param)

onTypeVariable

protected abstract T onTypeVariable(TypeVariable type,
                                    P param)

onVoidType

protected abstract T onVoidType(VoidType type,
                                P param)

onWildcard

protected abstract T onWildcard(WildcardType type,
                                P param)


Copyright © 2005-2011 Oracle Corporation. All Rights Reserved.