public abstract class TypeVisitor
extends java.lang.Object
visit(Collection)
or
visit(Type...)
within each implementation of the abstract
visiting methods.Constructor and Description |
---|
TypeVisitor()
Instantiate a new TypeVisitor which does not allow repeat visits.
|
TypeVisitor(boolean allowRepeatVisits)
Instantiate a new TypeVisitor.
|
Modifier and Type | Method and Description |
---|---|
void |
visit(java.util.Collection<? extends java.lang.reflect.Type> types)
Visit each type in a given collection, passing them to the appropriate
member methods as encountered.
|
void |
visit(java.lang.reflect.Type... types)
Visit each type in a given collection, passing them to the appropriate
member methods as encountered.
|
void |
visit(java.lang.reflect.Type type)
Visit a given type by passing it to the appropriate visitation methods.
|
protected void |
visitClass(java.lang.Class<?> type) |
protected void |
visitGenericArrayType(java.lang.reflect.GenericArrayType type) |
protected void |
visitInferenceVariable(InferenceVariable type) |
protected void |
visitIntersectionType(IntersectionType type) |
protected void |
visitNull() |
protected void |
visitParameterizedType(java.lang.reflect.ParameterizedType type) |
protected void |
visitTypeVariable(java.lang.reflect.TypeVariable<?> type) |
protected void |
visitTypeVariableCapture(TypeVariableCapture type) |
protected void |
visitWildcardType(java.lang.reflect.WildcardType type) |
public TypeVisitor()
public TypeVisitor(boolean allowRepeatVisits)
allowRepeatVisits
- If this is true, types which are encountered multiple times will
be visited each time they are encountered, otherwise they will
only be visited the first time they are encountered.public final void visit(java.lang.reflect.Type type)
type
- The type to visit.public void visit(java.lang.reflect.Type... types)
types
- The collection of types to visit.public void visit(java.util.Collection<? extends java.lang.reflect.Type> types)
types
- The collection of types to visit.protected void visitNull()
protected void visitClass(java.lang.Class<?> type)
protected void visitParameterizedType(java.lang.reflect.ParameterizedType type)
protected void visitGenericArrayType(java.lang.reflect.GenericArrayType type)
protected void visitWildcardType(java.lang.reflect.WildcardType type)
protected void visitTypeVariableCapture(TypeVariableCapture type)
protected void visitTypeVariable(java.lang.reflect.TypeVariable<?> type)
protected void visitInferenceVariable(InferenceVariable type)
protected void visitIntersectionType(IntersectionType type)