APIdia Launch Partner
Top Description Fields Constructors Methods
javax.lang.model.util

public Class SimpleTypeVisitor6<R, P>

extends AbstractTypeVisitor6<R, P>
Class Inheritance
Known Direct Subclasses
javax.lang.model.util.SimpleTypeVisitor7, javax.lang.model.util.TypeKindVisitor6
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.lang.model.type.*, javax.annotation.processing.SupportedSourceVersion, javax.lang.model.SourceVersion

A simple visitor of types with default behavior appropriate for the RELEASE_6 source version. Visit methods corresponding to RELEASE_6 language constructs call defaultAction, passing their arguments to defaultAction's corresponding parameters. For constructs introduced in RELEASE_7 and later, visitUnknown is called instead.

API Note

Methods in this class may be overridden subject to their general contract.

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 simple 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
SimpleTypeVisitor7, SimpleTypeVisitor8, SimpleTypeVisitor9, SimpleTypeVisitor14

Field Summary

Modifier and TypeField and Description
protected final R
DEFAULT_VALUE

Default value to be returned; defaultAction returns this value unless the method is overridden.

Constructor Summary

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

Constructor for concrete subclasses; uses null for the default value.

protected
SimpleTypeVisitor6(R
the value to assign to DEFAULT_VALUE
defaultValue
)
Deprecated since 9. Release 6 is obsolete; update to a visitor for a newer release level.

Constructor for concrete subclasses; uses the argument for the default value.

Method Summary

Modifier and TypeMethod and Description
protected R

Returns:

DEFAULT_VALUE unless overridden
defaultAction
(TypeMirror
the type to process
t
,
P
a visitor-specified parameter
p
)

The default action for visit methods.

public R

Returns:

the result of defaultAction
visitArray
(ArrayType t, P p)

Implements javax.lang.model.type.TypeVisitor.visitArray.

Visits an array type.

public R

Returns:

the result of defaultAction
visitDeclared
(DeclaredType t, P p)

Implements javax.lang.model.type.TypeVisitor.visitDeclared.

Visits a declared type.

public R

Returns:

the result of defaultAction
visitError
(ErrorType t, P p)

Implements javax.lang.model.type.TypeVisitor.visitError.

Visits an error type.

public R

Returns:

the result of defaultAction
visitExecutable
(ExecutableType t, P p)

Implements javax.lang.model.type.TypeVisitor.visitExecutable.

Visits an executable type.

public R

Returns:

the result of defaultAction
visitNoType
(NoType t, P p)

Implements javax.lang.model.type.TypeVisitor.visitNoType.

Visits a NoType instance.

public R

Returns:

the result of defaultAction
visitNull
(NullType t, P p)

Implements javax.lang.model.type.TypeVisitor.visitNull.

Visits the null type.

public R

Returns:

the result of defaultAction
visitPrimitive
(PrimitiveType t, P p)

Implements javax.lang.model.type.TypeVisitor.visitPrimitive.

Visits a primitive type.

public R

Returns:

the result of defaultAction
visitTypeVariable
(TypeVariable t, P p)

Implements javax.lang.model.type.TypeVisitor.visitTypeVariable.

Visits a type variable.

public R

Returns:

the result of defaultAction
visitWildcard
(WildcardType t, P p)

Implements javax.lang.model.type.TypeVisitor.visitWildcard.

Visits a wildcard type.

Inherited from javax.lang.model.util.AbstractTypeVisitor6:
visitvisitvisitIntersectionvisitUnionvisitUnknown

Field Detail

DEFAULT_VALUEback to summary
protected final R DEFAULT_VALUE

Default value to be returned; defaultAction returns this value unless the method is overridden.

Constructor Detail

SimpleTypeVisitor6back to summary
protected SimpleTypeVisitor6()

Deprecated

since 9.

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

Constructor for concrete subclasses; uses null for the default value.

Annotations
@Deprecated
since:9
SimpleTypeVisitor6back to summary
protected SimpleTypeVisitor6(R defaultValue)

Deprecated

since 9.

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

Constructor for concrete subclasses; uses the argument for the default value.

Parameters
defaultValue:R

the value to assign to DEFAULT_VALUE

Annotations
@Deprecated
since:9

Method Detail

defaultActionback to summary
protected R defaultAction(TypeMirror t, P p)

The default action for visit methods.

Implementation Specification

The implementation in this class just returns DEFAULT_VALUE; subclasses will commonly override this method.

Parameters
t:TypeMirror

the type to process

p:P

a visitor-specified parameter

Returns:R

DEFAULT_VALUE unless overridden

visitArrayback to summary
public R visitArray(ArrayType t, P p)

Implements javax.lang.model.type.TypeVisitor.visitArray.

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

Visits an array type.

Implementation Specification

This implementation calls defaultAction.

Returns:R

the result of defaultAction

Annotations
@Override
visitDeclaredback to summary
public R visitDeclared(DeclaredType t, P p)

Implements javax.lang.model.type.TypeVisitor.visitDeclared.

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

Visits a declared type.

Implementation Specification

This implementation calls defaultAction.

Returns:R

the result of defaultAction

Annotations
@Override
visitErrorback to summary
public R visitError(ErrorType t, P p)

Implements javax.lang.model.type.TypeVisitor.visitError.

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

Visits an error type.

Implementation Specification

This implementation calls defaultAction.

Returns:R

the result of defaultAction

Annotations
@Override
visitExecutableback to summary
public R visitExecutable(ExecutableType t, P p)

Implements javax.lang.model.type.TypeVisitor.visitExecutable.

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

Visits an executable type.

Implementation Specification

This implementation calls defaultAction.

Returns:R

the result of defaultAction

Annotations
@Override
visitNoTypeback to summary
public R visitNoType(NoType t, P p)

Implements javax.lang.model.type.TypeVisitor.visitNoType.

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

Visits a NoType instance.

Implementation Specification

This implementation calls defaultAction.

Returns:R

the result of defaultAction

Annotations
@Override
visitNullback to summary
public R visitNull(NullType t, P p)

Implements javax.lang.model.type.TypeVisitor.visitNull.

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

Visits the null type.

Implementation Specification

This implementation calls defaultAction.

Returns:R

the result of defaultAction

Annotations
@Override
visitPrimitiveback to summary
public R visitPrimitive(PrimitiveType t, P p)

Implements javax.lang.model.type.TypeVisitor.visitPrimitive.

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

Visits a primitive type.

Implementation Specification

This implementation calls defaultAction.

Returns:R

the result of defaultAction

Annotations
@Override
visitTypeVariableback to summary
public R visitTypeVariable(TypeVariable t, P p)

Implements javax.lang.model.type.TypeVisitor.visitTypeVariable.

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

Visits a type variable.

Implementation Specification

This implementation calls defaultAction.

Returns:R

the result of defaultAction

Annotations
@Override
visitWildcardback to summary
public R visitWildcard(WildcardType t, P p)

Implements javax.lang.model.type.TypeVisitor.visitWildcard.

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

Visits a wildcard type.

Implementation Specification

This implementation calls defaultAction.

Returns:R

the result of defaultAction

Annotations
@Override