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

public Class SimpleAnnotationValueVisitor6<R, P>

extends AbstractAnnotationValueVisitor6<R, P>
Class Inheritance
Known Direct Subclasses
javax.lang.model.util.SimpleAnnotationValueVisitor7
Annotations
@SupportedSourceVersion:RELEASE_6
Type Parameters
<R>
the return type of this visitor's methods
<P>
the type of the additional parameter to this visitor's methods.
Imports
java.util.List, javax.lang.model.element.*, javax.lang.model.type.TypeMirror, javax.lang.model.SourceVersion, javax.annotation.processing.SupportedSourceVersion

A simple visitor for annotation values with default behavior appropriate for the RELEASE_6 source version. Visit 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 AnnotationValueVisitor 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 annotation value 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
SimpleAnnotationValueVisitor7, SimpleAnnotationValueVisitor8, SimpleAnnotationValueVisitor9, SimpleAnnotationValueVisitor14

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
SimpleAnnotationValueVisitor6()
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
SimpleAnnotationValueVisitor6(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
(Object
the value of the annotation
o
,
P
a visitor-specified parameter
p
)

The default action for visit methods.

public R

Returns:

the result of defaultAction
visitAnnotation
(AnnotationMirror a, P p)

Implements javax.lang.model.element.AnnotationValueVisitor.visitAnnotation.

Visits an annotation value in an annotation.

public R

Returns:

the result of defaultAction
visitArray
(List<? extends AnnotationValue> vals, P p)

Implements javax.lang.model.element.AnnotationValueVisitor.visitArray.

Visits an array value in an annotation.

public R

Returns:

the result of defaultAction
visitBoolean
(boolean b, P p)

Implements javax.lang.model.element.AnnotationValueVisitor.visitBoolean.

Visits a boolean value in an annotation.

public R

Returns:

the result of defaultAction
visitByte
(byte b, P p)

Implements javax.lang.model.element.AnnotationValueVisitor.visitByte.

Visits a byte value in an annotation.

public R

Returns:

the result of defaultAction
visitChar
(char c, P p)

Implements javax.lang.model.element.AnnotationValueVisitor.visitChar.

Visits a char value in an annotation.

public R

Returns:

the result of defaultAction
visitDouble
(double d, P p)

Implements javax.lang.model.element.AnnotationValueVisitor.visitDouble.

Visits a double value in an annotation.

public R

Returns:

the result of defaultAction
visitEnumConstant
(VariableElement c, P p)

Implements javax.lang.model.element.AnnotationValueVisitor.visitEnumConstant.

Visits an enum value in an annotation.

public R

Returns:

the result of defaultAction
visitFloat
(float f, P p)

Implements javax.lang.model.element.AnnotationValueVisitor.visitFloat.

Visits a float value in an annotation.

public R

Returns:

the result of defaultAction
visitInt
(int i, P p)

Implements javax.lang.model.element.AnnotationValueVisitor.visitInt.

Visits an int value in an annotation.

public R

Returns:

the result of defaultAction
visitLong
(long i, P p)

Implements javax.lang.model.element.AnnotationValueVisitor.visitLong.

Visits a long value in an annotation.

public R

Returns:

the result of defaultAction
visitShort
(short s, P p)

Implements javax.lang.model.element.AnnotationValueVisitor.visitShort.

Visits a short value in an annotation.

public R

Returns:

the result of defaultAction
visitString
(String s, P p)

Implements javax.lang.model.element.AnnotationValueVisitor.visitString.

Visits a string value in an annotation.

public R

Returns:

the result of defaultAction
visitType
(TypeMirror t, P p)

Implements javax.lang.model.element.AnnotationValueVisitor.visitType.

Visits a type value in an annotation.

Inherited from javax.lang.model.util.AbstractAnnotationValueVisitor6:
visitvisitvisitUnknown

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

SimpleAnnotationValueVisitor6back to summary
protected SimpleAnnotationValueVisitor6()

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
SimpleAnnotationValueVisitor6back to summary
protected SimpleAnnotationValueVisitor6(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(Object o, 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
o:Object

the value of the annotation

p:P

a visitor-specified parameter

Returns:R

DEFAULT_VALUE unless overridden

visitAnnotationback to summary
public R visitAnnotation(AnnotationMirror a, P p)

Implements javax.lang.model.element.AnnotationValueVisitor.visitAnnotation.

Doc from javax.lang.model.element.AnnotationValueVisitor.visitAnnotation.

Visits an annotation value in an annotation.

Implementation Specification

This implementation calls defaultAction.

Returns:R

the result of defaultAction

visitArrayback to summary
public R visitArray(List<? extends AnnotationValue> vals, P p)

Implements javax.lang.model.element.AnnotationValueVisitor.visitArray.

Doc from javax.lang.model.element.AnnotationValueVisitor.visitArray.

Visits an array value in an annotation.

Implementation Specification

This implementation calls defaultAction.

Returns:R

the result of defaultAction

visitBooleanback to summary
public R visitBoolean(boolean b, P p)

Implements javax.lang.model.element.AnnotationValueVisitor.visitBoolean.

Doc from javax.lang.model.element.AnnotationValueVisitor.visitBoolean.

Visits a boolean value in an annotation.

Implementation Specification

This implementation calls defaultAction.

Returns:R

the result of defaultAction

visitByteback to summary
public R visitByte(byte b, P p)

Implements javax.lang.model.element.AnnotationValueVisitor.visitByte.

Doc from javax.lang.model.element.AnnotationValueVisitor.visitByte.

Visits a byte value in an annotation.

Implementation Specification

This implementation calls defaultAction.

Returns:R

the result of defaultAction

visitCharback to summary
public R visitChar(char c, P p)

Implements javax.lang.model.element.AnnotationValueVisitor.visitChar.

Doc from javax.lang.model.element.AnnotationValueVisitor.visitChar.

Visits a char value in an annotation.

Implementation Specification

This implementation calls defaultAction.

Returns:R

the result of defaultAction

visitDoubleback to summary
public R visitDouble(double d, P p)

Implements javax.lang.model.element.AnnotationValueVisitor.visitDouble.

Doc from javax.lang.model.element.AnnotationValueVisitor.visitDouble.

Visits a double value in an annotation.

Implementation Specification

This implementation calls defaultAction.

Returns:R

the result of defaultAction

visitEnumConstantback to summary
public R visitEnumConstant(VariableElement c, P p)

Implements javax.lang.model.element.AnnotationValueVisitor.visitEnumConstant.

Doc from javax.lang.model.element.AnnotationValueVisitor.visitEnumConstant.

Visits an enum value in an annotation.

Implementation Specification

This implementation calls defaultAction.

Returns:R

the result of defaultAction

visitFloatback to summary
public R visitFloat(float f, P p)

Implements javax.lang.model.element.AnnotationValueVisitor.visitFloat.

Doc from javax.lang.model.element.AnnotationValueVisitor.visitFloat.

Visits a float value in an annotation.

Implementation Specification

This implementation calls defaultAction.

Returns:R

the result of defaultAction

visitIntback to summary
public R visitInt(int i, P p)

Implements javax.lang.model.element.AnnotationValueVisitor.visitInt.

Doc from javax.lang.model.element.AnnotationValueVisitor.visitInt.

Visits an int value in an annotation.

Implementation Specification

This implementation calls defaultAction.

Returns:R

the result of defaultAction

visitLongback to summary
public R visitLong(long i, P p)

Implements javax.lang.model.element.AnnotationValueVisitor.visitLong.

Doc from javax.lang.model.element.AnnotationValueVisitor.visitLong.

Visits a long value in an annotation.

Implementation Specification

This implementation calls defaultAction.

Returns:R

the result of defaultAction

visitShortback to summary
public R visitShort(short s, P p)

Implements javax.lang.model.element.AnnotationValueVisitor.visitShort.

Doc from javax.lang.model.element.AnnotationValueVisitor.visitShort.

Visits a short value in an annotation.

Implementation Specification

This implementation calls defaultAction.

Returns:R

the result of defaultAction

visitStringback to summary
public R visitString(String s, P p)

Implements javax.lang.model.element.AnnotationValueVisitor.visitString.

Doc from javax.lang.model.element.AnnotationValueVisitor.visitString.

Visits a string value in an annotation.

Implementation Specification

This implementation calls defaultAction.

Returns:R

the result of defaultAction

visitTypeback to summary
public R visitType(TypeMirror t, P p)

Implements javax.lang.model.element.AnnotationValueVisitor.visitType.

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

Visits a type value in an annotation.

Implementation Specification

This implementation calls defaultAction.

Returns:R

the result of defaultAction