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 extends @NonNull Object,P extends @NonNull Object> extends @NonNull 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 |
Modifier and Type | Method and Description |
---|---|
protected R |
defaultAction(@Mutable AnnotatedTypeMirror type,
P p)
Performs the default action for visiting trees, if subclasses do not
override the visitFOO node.
|
R |
visit(@Mutable AnnotatedTypeMirror type)
A Convenience method equivalent to
v.visit(t, null) . |
R |
visit(@Mutable AnnotatedTypeMirror type,
P p)
Visits a type.
|
R |
visitArray(AnnotatedTypeMirror.AnnotatedArrayType type,
P p)
Visits an array type.
|
R |
visitDeclared(AnnotatedTypeMirror.AnnotatedDeclaredType type,
P p)
Visits a declared type.
|
R |
visitExecutable(AnnotatedTypeMirror.AnnotatedExecutableType type,
P p)
Visits an executable type.
|
R |
visitNoType(AnnotatedTypeMirror.AnnotatedNoType type,
P p)
Visits NoType type.
|
R |
visitNull(AnnotatedTypeMirror.AnnotatedNullType type,
P p)
Visits a
null type. |
R |
visitPrimitive(AnnotatedTypeMirror.AnnotatedPrimitiveType type,
P p)
Visits a primitive type.
|
R |
visitTypeVariable(AnnotatedTypeMirror.AnnotatedTypeVariable type,
P p)
Visits a type variable.
|
R |
visitWildcard(AnnotatedTypeMirror.AnnotatedWildcardType type,
P p)
Visits a wildcard type.
|
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(@Mutable AnnotatedTypeMirror type, P p)
DEFAULT_VALUE
).public R visit(@Mutable AnnotatedTypeMirror type)
AnnotatedTypeVisitor
v.visit(t, null)
.public R visit(@Mutable AnnotatedTypeMirror type, P p)
AnnotatedTypeVisitor
public R visitDeclared(AnnotatedTypeMirror.AnnotatedDeclaredType type, P p)
AnnotatedTypeVisitor
visitDeclared
in interface AnnotatedTypeVisitor<R extends @NonNull Object,P extends @NonNull Object>
type
- the type to visitp
- a visitor-specified parameterpublic R visitArray(AnnotatedTypeMirror.AnnotatedArrayType type, P p)
AnnotatedTypeVisitor
visitArray
in interface AnnotatedTypeVisitor<R extends @NonNull Object,P extends @NonNull Object>
type
- the type to visitp
- a visitor-specified parameterpublic R visitExecutable(AnnotatedTypeMirror.AnnotatedExecutableType type, P p)
AnnotatedTypeVisitor
visitExecutable
in interface AnnotatedTypeVisitor<R extends @NonNull Object,P extends @NonNull Object>
type
- the type to visitp
- a visitor-specified parameterpublic R visitTypeVariable(AnnotatedTypeMirror.AnnotatedTypeVariable type, P p)
AnnotatedTypeVisitor
visitTypeVariable
in interface AnnotatedTypeVisitor<R extends @NonNull Object,P extends @NonNull Object>
type
- the type to visitp
- a visitor-specified parameterpublic R visitWildcard(AnnotatedTypeMirror.AnnotatedWildcardType type, P p)
AnnotatedTypeVisitor
visitWildcard
in interface AnnotatedTypeVisitor<R extends @NonNull Object,P extends @NonNull Object>
type
- the type to visitp
- a visitor-specified parameterpublic R visitPrimitive(AnnotatedTypeMirror.AnnotatedPrimitiveType type, P p)
AnnotatedTypeVisitor
visitPrimitive
in interface AnnotatedTypeVisitor<R extends @NonNull Object,P extends @NonNull Object>
type
- the type to visitp
- a visitor-specified parameterpublic R visitNull(AnnotatedTypeMirror.AnnotatedNullType type, P p)
AnnotatedTypeVisitor
null
type.public R visitNoType(AnnotatedTypeMirror.AnnotatedNoType type, P p)
AnnotatedTypeVisitor
visitNoType
in interface AnnotatedTypeVisitor<R extends @NonNull Object,P extends @NonNull Object>
type
- the type to visitp
- a visitor-specified parameter