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.public interface AnnotatedTypeVisitor<R,P>
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.
R visit(AnnotatedTypeMirror type)
v.visit(t, null)
.type
- the type to visitR visit(AnnotatedTypeMirror type, P p)
type
- the type to visitp
- a visitor-specified parameterR visitDeclared(AnnotatedTypeMirror.AnnotatedDeclaredType type, P p)
type
- the type to visitp
- a visitor-specified parameterR visitIntersection(AnnotatedTypeMirror.AnnotatedIntersectionType type, P p)
type
- the type to visitp
- a visitor-specified parameterR visitUnion(AnnotatedTypeMirror.AnnotatedUnionType type, P p)
type
- the type to visitp
- a visitor-specified parameterR visitExecutable(AnnotatedTypeMirror.AnnotatedExecutableType type, P p)
type
- the type to visitp
- a visitor-specified parameterR visitArray(AnnotatedTypeMirror.AnnotatedArrayType type, P p)
type
- the type to visitp
- a visitor-specified parameterR visitTypeVariable(AnnotatedTypeMirror.AnnotatedTypeVariable type, P p)
type
- the type to visitp
- a visitor-specified parameterR visitPrimitive(AnnotatedTypeMirror.AnnotatedPrimitiveType type, P p)
type
- the type to visitp
- a visitor-specified parameterR visitNoType(AnnotatedTypeMirror.AnnotatedNoType type, P p)
type
- the type to visitp
- a visitor-specified parameterR visitNull(AnnotatedTypeMirror.AnnotatedNullType type, P p)
null
type.type
- the type to visitp
- a visitor-specified parameterR visitWildcard(AnnotatedTypeMirror.AnnotatedWildcardType type, P p)
type
- the type to visitp
- a visitor-specified parameter