com.sun.tools.apt.mirror.declaration
Class AnnotationValueImpl

java.lang.Object
  extended by com.sun.tools.apt.mirror.declaration.AnnotationValueImpl
All Implemented Interfaces:
AnnotationValue

public class AnnotationValueImpl
extends java.lang.Object
implements AnnotationValue

Implementation of AnnotationValue


Nested Class Summary
private  class AnnotationValueImpl.ValueVisitor
           
 
Field Summary
protected  AnnotationMirrorImpl annotation
           
protected  Attribute attr
           
protected  AptEnv env
           
 
Constructor Summary
AnnotationValueImpl(AptEnv env, Attribute attr, AnnotationMirrorImpl annotation)
           
 
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
 

Field Detail

env

protected final AptEnv env

attr

protected final Attribute attr

annotation

protected final AnnotationMirrorImpl annotation
Constructor Detail

AnnotationValueImpl

AnnotationValueImpl(AptEnv env,
                    Attribute attr,
                    AnnotationMirrorImpl annotation)
Method Detail

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:

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