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 class SimpleAnnotatedTypeVisitor<R,P> extends Object implements AnnotatedTypeVisitor<R,P>
AnnotatedTypeMirror
s.Modifier and Type | Field and Description |
---|---|
protected R |
DEFAULT_VALUE
The default value to return as a default action
|
Constructor and Description |
---|
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 |
protected final R DEFAULT_VALUE
public SimpleAnnotatedTypeVisitor()
SimpleAnnotatedTypeVisitor
with default value being null
public SimpleAnnotatedTypeVisitor(R defaultValue)
SimpleAnnotatedTypeVisitor
with the default value being the
passed defaultValuedefaultValue
- the default value this class should returnprotected R defaultAction(AnnotatedTypeMirror type, P p)
This implementation merely returns the default value (as specified by the protected field
DEFAULT_VALUE
).
public R visit(AnnotatedTypeMirror type)
AnnotatedTypeVisitor
v.visit(t, null)
.visit
in interface AnnotatedTypeVisitor<R,P>
type
- the type to visitpublic R visit(AnnotatedTypeMirror type, P p)
AnnotatedTypeVisitor
visit
in interface AnnotatedTypeVisitor<R,P>
type
- the type to visitp
- a visitor-specified parameterpublic R visitDeclared(AnnotatedTypeMirror.AnnotatedDeclaredType type, P p)
AnnotatedTypeVisitor
visitDeclared
in interface AnnotatedTypeVisitor<R,P>
type
- the type to visitp
- a visitor-specified parameterpublic R visitIntersection(AnnotatedTypeMirror.AnnotatedIntersectionType type, P p)
AnnotatedTypeVisitor
visitIntersection
in interface AnnotatedTypeVisitor<R,P>
type
- the type to visitp
- a visitor-specified parameterpublic R visitUnion(AnnotatedTypeMirror.AnnotatedUnionType type, P p)
AnnotatedTypeVisitor
visitUnion
in interface AnnotatedTypeVisitor<R,P>
type
- the type to visitp
- a visitor-specified parameterpublic R visitArray(AnnotatedTypeMirror.AnnotatedArrayType type, P p)
AnnotatedTypeVisitor
visitArray
in interface AnnotatedTypeVisitor<R,P>
type
- the type to visitp
- a visitor-specified parameterpublic R visitExecutable(AnnotatedTypeMirror.AnnotatedExecutableType type, P p)
AnnotatedTypeVisitor
visitExecutable
in interface AnnotatedTypeVisitor<R,P>
type
- the type to visitp
- a visitor-specified parameterpublic R visitTypeVariable(AnnotatedTypeMirror.AnnotatedTypeVariable type, P p)
AnnotatedTypeVisitor
visitTypeVariable
in interface AnnotatedTypeVisitor<R,P>
type
- the type to visitp
- a visitor-specified parameterpublic R visitWildcard(AnnotatedTypeMirror.AnnotatedWildcardType type, P p)
AnnotatedTypeVisitor
visitWildcard
in interface AnnotatedTypeVisitor<R,P>
type
- the type to visitp
- a visitor-specified parameterpublic R visitPrimitive(AnnotatedTypeMirror.AnnotatedPrimitiveType type, P p)
AnnotatedTypeVisitor
visitPrimitive
in interface AnnotatedTypeVisitor<R,P>
type
- the type to visitp
- a visitor-specified parameterpublic R visitNull(AnnotatedTypeMirror.AnnotatedNullType type, P p)
AnnotatedTypeVisitor
null
type.visitNull
in interface AnnotatedTypeVisitor<R,P>
type
- the type to visitp
- a visitor-specified parameterpublic R visitNoType(AnnotatedTypeMirror.AnnotatedNoType type, P p)
AnnotatedTypeVisitor
visitNoType
in interface AnnotatedTypeVisitor<R,P>
type
- the type to visitp
- a visitor-specified parameter