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

public Class SimpleElementVisitor6<R, P>

extends AbstractElementVisitor6<R, P>
Class Inheritance
Known Direct Subclasses
javax.lang.model.util.SimpleElementVisitor7, javax.lang.model.util.ElementKindVisitor6
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.element.*, javax.annotation.processing.SupportedSourceVersion, javax.lang.model.SourceVersion

A simple visitor of program elements 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 ElementVisitor 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 element 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
SimpleElementVisitor7, SimpleElementVisitor8, SimpleElementVisitor9, SimpleElementVisitor14

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
SimpleElementVisitor6()
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
SimpleElementVisitor6(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
(Element
the element to process
e
,
P
a visitor-specified parameter
p
)

The default action for visit methods.

public R
public R
public R
public R
public R
Inherited from javax.lang.model.util.AbstractElementVisitor6:
visitvisitvisitModulevisitRecordComponentvisitUnknown

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

SimpleElementVisitor6back to summary
protected SimpleElementVisitor6()

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
SimpleElementVisitor6back to summary
protected SimpleElementVisitor6(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(Element e, 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
e:Element

the element to process

p:P

a visitor-specified parameter

Returns:R

DEFAULT_VALUE unless overridden

visitExecutableback to summary
public R visitExecutable(ExecutableElement e, P p)

Implements javax.lang.model.element.ElementVisitor.visitExecutable.

Doc from javax.lang.model.element.ElementVisitor.visitExecutable.

Visits an executable element.

Implementation Specification

This implementation calls defaultAction.

Annotations
@Override
visitPackageback to summary
public R visitPackage(PackageElement e, P p)

Implements javax.lang.model.element.ElementVisitor.visitPackage.

Doc from javax.lang.model.element.ElementVisitor.visitPackage.

Visits a package element.

Implementation Specification

This implementation calls defaultAction.

Annotations
@Override
visitTypeback to summary
public R visitType(TypeElement e, P p)

Implements javax.lang.model.element.ElementVisitor.visitType.

Doc from javax.lang.model.element.ElementVisitor.visitType.

Visits a type element.

Implementation Specification

This implementation calls defaultAction.

Annotations
@Override
visitTypeParameterback to summary
public R visitTypeParameter(TypeParameterElement e, P p)

Implements javax.lang.model.element.ElementVisitor.visitTypeParameter.

Doc from javax.lang.model.element.ElementVisitor.visitTypeParameter.

Visits a type parameter element.

Implementation Specification

This implementation calls defaultAction.

Annotations
@Override
visitVariableback to summary
public R visitVariable(VariableElement e, P p)

Implements javax.lang.model.element.ElementVisitor.visitVariable.

Doc from javax.lang.model.element.ElementVisitor.visitVariable.

Visits a variable element.

Implementation Specification

This implementation calls defaultAction, unless the element is a RESOURCE_VARIABLE in which case visitUnknown is called.

Annotations
@Override