public class RecursiveTypeVisitor extends TypeVisitor
An implementation of TypeVisitor which provides recursion over the related types specified by the arguments passed to constructor. Supertypes of parameterized types are visited without those type arguments passed through.
This means that if the type List<String> is visited, the supertype
Collections<E> will be visited subsequently, rather than
Collection<String>. If the type String is visited, on the other hand,
the supertype Comparable<String> will be visited. If the raw type
List is visited, then the raw supertype Collection will be visited
subsequently.
| Modifier and Type | Class and Description |
|---|---|
static class |
RecursiveTypeVisitor.Builder
A builder for specifying the behavior of a new
RecursiveTypeVisitor
instance. |
| Modifier and Type | Method and Description |
|---|---|
static RecursiveTypeVisitor.Builder |
build() |
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 |
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) |
visit, visit, visit, visitNullpublic static RecursiveTypeVisitor.Builder build()
RecursiveTypeVisitor.Builder with which to describe a new
RecursiveTypeVisitor.protected void visitClass(java.lang.Class<?> type)
visitClass in class TypeVisitorprotected void visitGenericArrayType(java.lang.reflect.GenericArrayType type)
visitGenericArrayType in class TypeVisitorprotected void visitParameterizedType(java.lang.reflect.ParameterizedType type)
visitParameterizedType in class TypeVisitorprotected void visitTypeVariableCapture(TypeVariableCapture type)
visitTypeVariableCapture in class TypeVisitorprotected void visitTypeVariable(java.lang.reflect.TypeVariable<?> type)
visitTypeVariable in class TypeVisitorprotected void visitWildcardType(java.lang.reflect.WildcardType type)
visitWildcardType in class TypeVisitorprotected void visitIntersectionType(IntersectionType type)
visitIntersectionType in class TypeVisitorprotected void visitInferenceVariable(InferenceVariable type)
visitInferenceVariable in class TypeVisitor