FileDocCategorySizeDatePackage
SimpleAnnotationValueVisitor6.javaAPI DocJava SE 6 API7229Tue Jun 10 00:26:12 BST 2008javax.lang.model.util

SimpleAnnotationValueVisitor6

public class SimpleAnnotationValueVisitor6 extends AbstractAnnotationValueVisitor6
A simple visitor for annotation values with default behavior appropriate for the {@link SourceVersion#RELEASE_6 RELEASE_6} source version. Visit methods call {@link #defaultAction} passing their arguments to {@code defaultAction}'s corresponding parameters.

Methods in this class may be overridden subject to their general contract. Note that annotating methods in concrete subclasses with {@link java.lang.Override @Override} will help ensure that methods are overridden as intended.

WARNING: The {@code 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 {@code "visit"} may be added to this class in the future; to avoid incompatibilities, classes which extend this class should not declare any instance methods with names beginning with {@code "visit"}.

When such a new visit method is added, the default implementation in this class will be to call the {@link #visitUnknown 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 the new visitor is introduced, all or portions of this visitor may be deprecated.

param
the return type of this visitor's methods
param

the type of the additional parameter to this visitor's methods.

author
Joseph D. Darcy
author
Scott Seligman
author
Peter von der Ahé
version
1.6 06/08/15
since
1.6

Fields Summary
protected final R
DEFAULT_VALUE
Default value to be returned; {@link #defaultAction defaultAction} returns this value unless the method is overridden.
Constructors Summary
protected SimpleAnnotationValueVisitor6()
Constructor for concrete subclasses; uses {@code null} for the default value.

	super();
	DEFAULT_VALUE = null;
    
protected SimpleAnnotationValueVisitor6(R defaultValue)
Constructor for concrete subclasses; uses the argument for the default value.

param
defaultValue the value to assign to {@link #DEFAULT_VALUE}

	super();
	DEFAULT_VALUE = defaultValue;
    
Methods Summary
protected RdefaultAction(java.lang.Object o, P p)
The default action for visit methods. The implementation in this class just returns {@link #DEFAULT_VALUE}; subclasses will commonly override this method.

param
o the value of the annotation
param
p a visitor-specified parameter
return
{@code DEFAULT_VALUE} unless overridden

	return DEFAULT_VALUE;
    
public RvisitAnnotation(javax.lang.model.element.AnnotationMirror a, P p)
{@inheritDoc} This implementation calls {@code defaultAction}.

param
a {@inheritDoc}
param
p {@inheritDoc}
return
the result of {@code defaultAction}

	return defaultAction(a, p);
    
public RvisitArray(java.util.List vals, P p)
{@inheritDoc} This implementation calls {@code defaultAction}.

param
vals {@inheritDoc}
param
p {@inheritDoc}
return
the result of {@code defaultAction}

	return defaultAction(vals, p);
    
public RvisitBoolean(boolean b, P p)
{@inheritDoc} This implementation calls {@code defaultAction}.

param
b {@inheritDoc}
param
p {@inheritDoc}
return
the result of {@code defaultAction}

	return defaultAction(b, p);
    
public RvisitByte(byte b, P p)
{@inheritDoc} This implementation calls {@code defaultAction}.

param
b {@inheritDoc}
param
p {@inheritDoc}
return
the result of {@code defaultAction}

	return defaultAction(b, p);
    
public RvisitChar(char c, P p)
{@inheritDoc} This implementation calls {@code defaultAction}.

param
c {@inheritDoc}
param
p {@inheritDoc}
return
the result of {@code defaultAction}

	return defaultAction(c, p);
    
public RvisitDouble(double d, P p)
{@inheritDoc} This implementation calls {@code defaultAction}.

param
d {@inheritDoc}
param
p {@inheritDoc}
return
the result of {@code defaultAction}

	return defaultAction(d, p);
    
public RvisitEnumConstant(javax.lang.model.element.VariableElement c, P p)
{@inheritDoc} This implementation calls {@code defaultAction}.

param
c {@inheritDoc}
param
p {@inheritDoc}
return
the result of {@code defaultAction}

	return defaultAction(c, p);
    
public RvisitFloat(float f, P p)
{@inheritDoc} This implementation calls {@code defaultAction}.

param
f {@inheritDoc}
param
p {@inheritDoc}
return
the result of {@code defaultAction}

	return defaultAction(f, p);
    
public RvisitInt(int i, P p)
{@inheritDoc} This implementation calls {@code defaultAction}.

param
i {@inheritDoc}
param
p {@inheritDoc}
return
the result of {@code defaultAction}

	return defaultAction(i, p);
    
public RvisitLong(long i, P p)
{@inheritDoc} This implementation calls {@code defaultAction}.

param
i {@inheritDoc}
param
p {@inheritDoc}
return
the result of {@code defaultAction}

	return defaultAction(i, p);
    
public RvisitShort(short s, P p)
{@inheritDoc} This implementation calls {@code defaultAction}.

param
s {@inheritDoc}
param
p {@inheritDoc}
return
the result of {@code defaultAction}

	return defaultAction(s, p);
    
public RvisitString(java.lang.String s, P p)
{@inheritDoc} This implementation calls {@code defaultAction}.

param
s {@inheritDoc}
param
p {@inheritDoc}
return
the result of {@code defaultAction}

	return defaultAction(s, p);
    
public RvisitType(javax.lang.model.type.TypeMirror t, P p)
{@inheritDoc} This implementation calls {@code defaultAction}.

param
t {@inheritDoc}
param
p {@inheritDoc}
return
the result of {@code defaultAction}

	return defaultAction(t, p);