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

public Class TypeKindVisitor6<R, P>

extends SimpleTypeVisitor6<R, P>
Class Inheritance
Known Direct Subclasses
javax.lang.model.util.TypeKindVisitor7
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.SourceVersion, javax.lang.model.type.*

A visitor of types based on their kind with default behavior appropriate for the RELEASE_6 source version. For types Xyz that may have more than one kind, the visitXyz methods in this class delegate to the visitXyzAsKind method corresponding to the first argument's kind. The visitXyzAsKind methods call defaultAction, passing their arguments to defaultAction's corresponding parameters.

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 or the TypeKind enum used in this class may have constants 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 type kind 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
TypeKindVisitor7, TypeKindVisitor8, TypeKindVisitor9, TypeKindVisitor14

Field Summary

Inherited from javax.lang.model.util.SimpleTypeVisitor6:
DEFAULT_VALUE

Constructor Summary

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

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

protected
TypeKindVisitor6(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 to call; uses the argument for the default value.

Method Summary

Modifier and TypeMethod and Description
public R

Returns:

the result of the kind-specific visit method
visitNoType
(NoType t, P p)

Overrides javax.lang.model.util.SimpleTypeVisitor6.visitNoType.

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

Visits a NoType instance.

public R

Returns:

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

Visits a MODULE pseudo-type.

public R

Returns:

the result of defaultAction
visitNoTypeAsNone
(NoType
the type to visit
t
,
P
a visitor-specified parameter
p
)

Visits a NONE pseudo-type.

public R

Returns:

the result of defaultAction
visitNoTypeAsPackage
(NoType
the type to visit
t
,
P
a visitor-specified parameter
p
)

Visits a PACKAGE pseudo-type.

public R

Returns:

the result of defaultAction
visitNoTypeAsVoid
(NoType
the type to visit
t
,
P
a visitor-specified parameter
p
)

Visits a VOID pseudo-type.

public R

Returns:

the result of the kind-specific visit method
visitPrimitive
(PrimitiveType t, P p)

Overrides javax.lang.model.util.SimpleTypeVisitor6.visitPrimitive.

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

Visits a primitive type.

public R

Returns:

the result of defaultAction
visitPrimitiveAsBoolean
(PrimitiveType
the type to visit
t
,
P
a visitor-specified parameter
p
)

Visits a BOOLEAN primitive type.

public R

Returns:

the result of defaultAction
visitPrimitiveAsByte
(PrimitiveType
the type to visit
t
,
P
a visitor-specified parameter
p
)

Visits a BYTE primitive type.

public R

Returns:

the result of defaultAction
visitPrimitiveAsChar
(PrimitiveType
the type to visit
t
,
P
a visitor-specified parameter
p
)

Visits a CHAR primitive type.

public R

Returns:

the result of defaultAction
visitPrimitiveAsDouble
(PrimitiveType
the type to visit
t
,
P
a visitor-specified parameter
p
)

Visits a DOUBLE primitive type.

public R

Returns:

the result of defaultAction
visitPrimitiveAsFloat
(PrimitiveType
the type to visit
t
,
P
a visitor-specified parameter
p
)

Visits a FLOAT primitive type.

public R

Returns:

the result of defaultAction
visitPrimitiveAsInt
(PrimitiveType
the type to visit
t
,
P
a visitor-specified parameter
p
)

Visits an INT primitive type.

public R

Returns:

the result of defaultAction
visitPrimitiveAsLong
(PrimitiveType
the type to visit
t
,
P
a visitor-specified parameter
p
)

Visits a LONG primitive type.

public R

Returns:

the result of defaultAction
visitPrimitiveAsShort
(PrimitiveType
the type to visit
t
,
P
a visitor-specified parameter
p
)

Visits a SHORT primitive type.

Inherited from javax.lang.model.util.SimpleTypeVisitor6:
defaultActionvisitArrayvisitDeclaredvisitErrorvisitExecutablevisitNullvisitTypeVariablevisitWildcard

Constructor Detail

TypeKindVisitor6back to summary
protected TypeKindVisitor6()

Deprecated

since 9.

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

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

Annotations
@Deprecated
since:9
TypeKindVisitor6back to summary
protected TypeKindVisitor6(R defaultValue)

Deprecated

since 9.

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

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

Parameters
defaultValue:R

the value to assign to DEFAULT_VALUE

Annotations
@Deprecated
since:9

Method Detail

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

Overrides javax.lang.model.util.SimpleTypeVisitor6.visitNoType.

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

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

Visits a NoType instance.

Implementation Specification

This implementation dispatches to the visit method for the specific kind of pseudo-type: VOID, PACKAGE, MODULE, or NONE.

Returns:R

the result of the kind-specific visit method

Annotations
@Override
visitNoTypeAsModuleback to summary
public R visitNoTypeAsModule(NoType t, P p)

Visits a MODULE pseudo-type.

Implementation Specification

This implementation calls visitUnknown.

Parameters
t:NoType

the type to visit

p:P

a visitor-specified parameter

Returns:R

the result of visitUnknown

Since
10
visitNoTypeAsNoneback to summary
public R visitNoTypeAsNone(NoType t, P p)

Visits a NONE pseudo-type.

Implementation Specification

This implementation calls defaultAction.

Parameters
t:NoType

the type to visit

p:P

a visitor-specified parameter

Returns:R

the result of defaultAction

visitNoTypeAsPackageback to summary
public R visitNoTypeAsPackage(NoType t, P p)

Visits a PACKAGE pseudo-type.

Implementation Specification

This implementation calls defaultAction.

Parameters
t:NoType

the type to visit

p:P

a visitor-specified parameter

Returns:R

the result of defaultAction

visitNoTypeAsVoidback to summary
public R visitNoTypeAsVoid(NoType t, P p)

Visits a VOID pseudo-type.

Implementation Specification

This implementation calls defaultAction.

Parameters
t:NoType

the type to visit

p:P

a visitor-specified parameter

Returns:R

the result of defaultAction

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

Overrides javax.lang.model.util.SimpleTypeVisitor6.visitPrimitive.

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

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

Visits a primitive type.

Implementation Specification

This implementation dispatches to the visit method for the specific kind of primitive type: BOOLEAN, BYTE, etc.

Returns:R

the result of the kind-specific visit method

Annotations
@Override
visitPrimitiveAsBooleanback to summary
public R visitPrimitiveAsBoolean(PrimitiveType t, P p)

Visits a BOOLEAN primitive type.

Implementation Specification

This implementation calls defaultAction.

Parameters
t:PrimitiveType

the type to visit

p:P

a visitor-specified parameter

Returns:R

the result of defaultAction

visitPrimitiveAsByteback to summary
public R visitPrimitiveAsByte(PrimitiveType t, P p)

Visits a BYTE primitive type.

Implementation Specification

This implementation calls defaultAction.

Parameters
t:PrimitiveType

the type to visit

p:P

a visitor-specified parameter

Returns:R

the result of defaultAction

visitPrimitiveAsCharback to summary
public R visitPrimitiveAsChar(PrimitiveType t, P p)

Visits a CHAR primitive type.

Implementation Specification

This implementation calls defaultAction.

Parameters
t:PrimitiveType

the type to visit

p:P

a visitor-specified parameter

Returns:R

the result of defaultAction

visitPrimitiveAsDoubleback to summary
public R visitPrimitiveAsDouble(PrimitiveType t, P p)

Visits a DOUBLE primitive type.

Implementation Specification

This implementation calls defaultAction.

Parameters
t:PrimitiveType

the type to visit

p:P

a visitor-specified parameter

Returns:R

the result of defaultAction

visitPrimitiveAsFloatback to summary
public R visitPrimitiveAsFloat(PrimitiveType t, P p)

Visits a FLOAT primitive type.

Implementation Specification

This implementation calls defaultAction.

Parameters
t:PrimitiveType

the type to visit

p:P

a visitor-specified parameter

Returns:R

the result of defaultAction

visitPrimitiveAsIntback to summary
public R visitPrimitiveAsInt(PrimitiveType t, P p)

Visits an INT primitive type.

Implementation Specification

This implementation calls defaultAction.

Parameters
t:PrimitiveType

the type to visit

p:P

a visitor-specified parameter

Returns:R

the result of defaultAction

visitPrimitiveAsLongback to summary
public R visitPrimitiveAsLong(PrimitiveType t, P p)

Visits a LONG primitive type.

Implementation Specification

This implementation calls defaultAction.

Parameters
t:PrimitiveType

the type to visit

p:P

a visitor-specified parameter

Returns:R

the result of defaultAction

visitPrimitiveAsShortback to summary
public R visitPrimitiveAsShort(PrimitiveType t, P p)

Visits a SHORT primitive type.

Implementation Specification

This implementation calls defaultAction.

Parameters
t:PrimitiveType

the type to visit

p:P

a visitor-specified parameter

Returns:R

the result of defaultAction