Top Description Constructors Methods
javax.lang.model.util

public abstract Class AbstractTypeVisitor6<R, P>

extends Object
implements TypeVisitor<R, P>
Class Inheritance
All Implemented Interfaces
javax.lang.model.type.TypeVisitor
Known Direct Subclasses
javax.lang.model.util.SimpleTypeVisitor6, javax.lang.model.util.AbstractTypeVisitor7
Annotations
@SupportedSourceVersion:RELEASE_6
Type Parameters
<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.
Imports
javax.annotation.processing.SupportedSourceVersion, javax.lang.model.type.*

A skeletal visitor of types with default behavior appropriate for the RELEASE_6 source version.

API Note

WARNING: The TypeVisitor interface implemented by this class may have methods added to it in the future to accommodate new, currently unknown, language structures added to future versions of the Java programming language. Therefore, methods whose names begin with "visit" may be added to this class in the future; to avoid incompatibilities, classes and subclasses which extend this class should not declare any instance methods with names beginning with "visit".

When such a new visit method is added, the default implementation in this class will be to directly or indirectly call the visitUnknown method. A new abstract type visitor class will also be introduced to correspond to the new language level; this visitor will have different default behavior for the visit method in question. When a new visitor is introduced, portions of this visitor class may be deprecated, including its constructors.

Since
1.6
See Also
AbstractTypeVisitor7, AbstractTypeVisitor8, AbstractTypeVisitor9, AbstractTypeVisitor14

Constructor Summary

AccessConstructor and Description
protected
AbstractTypeVisitor6()
Deprecated since 9. Release 6 is obsolete; update to a visitor for a newer release level.

Constructor for concrete subclasses to call.

Method Summary

Modifier and TypeMethod and Description
public final R

Returns:

a visitor-specified result
visit
(TypeMirror
the type to visit
t
,
P
a visitor-specified parameter
p
)

Implements javax.lang.model.type.TypeVisitor.visit.

Visits any type mirror as if by passing itself to that type mirror's accept method.

public final R

Returns:

a visitor-specified result
visit
(TypeMirror
the type to visit
t
)

Overrides default javax.lang.model.type.TypeVisitor.visit.

Visits any type mirror as if by passing itself to that type mirror's accept method and passing null for the additional parameter.

public R

Returns:

the result of visitUnknown
visitIntersection
(IntersectionType
the type to visit
t
,
P
a visitor-specified parameter
p
)

Implements javax.lang.model.type.TypeVisitor.visitIntersection.

Visits an intersection type.

public R

Returns:

the result of visitUnknown
visitUnion
(UnionType
the type to visit
t
,
P
a visitor-specified parameter
p
)

Implements javax.lang.model.type.TypeVisitor.visitUnion.

Visits a union type.

public R

Returns:

a visitor-specified result
visitUnknown
(TypeMirror
the type to visit
t
,
P
a visitor-specified parameter
p
)

Implements javax.lang.model.type.TypeVisitor.visitUnknown.

Visits an unknown kind of type.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AbstractTypeVisitor6back to summary
protected AbstractTypeVisitor6()

Deprecated

since 9.

Release 6 is obsolete; update to a visitor for a newer release level.

Constructor for concrete subclasses to call.

Annotations
@Deprecated
since:9

Method Detail

visitback to summary
public final R visit(TypeMirror t, P p)

Implements javax.lang.model.type.TypeVisitor.visit.

Visits any type mirror as if by passing itself to that type mirror's accept method. The invocation v.visit(t, p) is equivalent to t.accept(v, p).

Parameters
t:TypeMirror

the type to visit

p:P

a visitor-specified parameter

Returns:R

a visitor-specified result

visitback to summary
public final R visit(TypeMirror t)

Overrides default javax.lang.model.type.TypeVisitor.visit.

Visits any type mirror as if by passing itself to that type mirror's accept method and passing null for the additional parameter. The invocation v.visit(t) is equivalent to t.accept(v, null).

Parameters
t:TypeMirror

the type to visit

Returns:R

a visitor-specified result

visitIntersectionback to summary
public R visitIntersection(IntersectionType t, P p)

Implements javax.lang.model.type.TypeVisitor.visitIntersection.

Doc from javax.lang.model.type.TypeVisitor.visitIntersection.

Visits an intersection type.

Implementation Specification

Visits an IntersectionType element by calling visitUnknown.

Parameters
t:IntersectionType

the type to visit

p:P

a visitor-specified parameter

Returns:R

the result of visitUnknown

Annotations
@Override
Since
1.8
visitUnionback to summary
public R visitUnion(UnionType t, P p)

Implements javax.lang.model.type.TypeVisitor.visitUnion.

Doc from javax.lang.model.type.TypeVisitor.visitUnion.

Visits a union type.

Implementation Specification

Visits a UnionType element by calling visitUnknown.

Parameters
t:UnionType

the type to visit

p:P

a visitor-specified parameter

Returns:R

the result of visitUnknown

Annotations
@Override
Since
1.7
visitUnknownback to summary
public R visitUnknown(TypeMirror t, P p)

Implements javax.lang.model.type.TypeVisitor.visitUnknown.

Doc from javax.lang.model.type.TypeVisitor.visitUnknown.

Visits an unknown kind of type. This can occur if the language evolves and new kinds of types are added to the TypeMirror hierarchy.

Implementation Specification

The default implementation of this method in AbstractTypeVisitor6 will always throw new UnknownTypeException(t, p). This behavior is not required of a subclass.

Parameters
t:TypeMirror

the type to visit

p:P

a visitor-specified parameter

Returns:R

a visitor-specified result

Annotations
@Override
Exceptions
UnknownTypeException:
a visitor implementation may optionally throw this exception