com.sun.tools.apt.mirror.declaration
Class AnnotationValueImpl
java.lang.Object
com.sun.tools.apt.mirror.declaration.AnnotationValueImpl
- All Implemented Interfaces:
- AnnotationValue
public class AnnotationValueImpl
- extends java.lang.Object
- implements AnnotationValue
Implementation of AnnotationValue
|
Method Summary |
SourcePosition |
getPosition()
Returns the source position of the beginning of this annotation value. |
java.lang.Object |
getValue()
Returns the value. |
java.lang.String |
toString()
Returns a string representation of this value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
env
protected final AptEnv env
attr
protected final Attribute attr
annotation
protected final AnnotationMirrorImpl annotation
AnnotationValueImpl
AnnotationValueImpl(AptEnv env,
Attribute attr,
AnnotationMirrorImpl annotation)
toString
public 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.
- Specified by:
toString in interface AnnotationValue- Overrides:
toString in class java.lang.Object
- Returns:
- a string representation of this value
getValue
public java.lang.Object getValue()
- Returns the value.
The result has one of the following types:
- a wrapper class (such as
Integer) for a primitive type
-
String
-
TypeMirror
-
EnumConstantDeclaration
-
AnnotationMirror
-
Collection<AnnotationValue>
(representing the elements, in order, if the value is an array)
- Specified by:
getValue in interface AnnotationValue
- Returns:
- the value
getPosition
public SourcePosition getPosition()
- Description copied from interface:
AnnotationValue
- Returns the source position of the beginning of this annotation value.
Returns null if the position is unknown or not applicable.
This source position is intended for use in providing diagnostics,
and indicates only approximately where an annotation value begins.
- Specified by:
getPosition in interface AnnotationValue
- Returns:
- the source position of the beginning of this annotation value or
null if the position is unknown or not applicable