javax.lang.model.element
Interface AnnotationValue

All Known Implementing Classes:
Attribute, Attribute.Array, Attribute.Class, Attribute.Compound, Attribute.Constant, Attribute.Enum, Attribute.Error, ClassReader.ArrayAttributeProxy, ClassReader.CompoundAnnotationProxy, ClassReader.EnumAttributeProxy

public interface AnnotationValue

Represents a value of an annotation type element. A value is of one of the following types:

Since:
1.6

Method Summary
<R,P> R
accept(AnnotationValueVisitor<R,P> v, P p)
          Applies a visitor to this value.
 java.lang.Object getValue()
          Returns the value.
 java.lang.String toString()
          Returns a string representation of this value.
 

Method Detail

getValue

java.lang.Object getValue()
Returns the value.

Returns:
the value

toString

java.lang.String toString()
Returns a string representation of this value. This is returned in a form suitable for representing this value in the source code of an annotation.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of this value

accept

<R,P> R accept(AnnotationValueVisitor<R,P> v,
               P p)
Applies a visitor to this value.

Type Parameters:
R - the return type of the visitor's methods
P - the type of the additional parameter to the visitor's methods
Parameters:
v - the visitor operating on this value
p - additional parameter to the visitor
Returns:
a visitor-specified result