src/share/classes/com/sun/mirror/declaration/AnnotationMirror.java

Print this page




  21  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  22  * CA 95054 USA or visit www.sun.com if you need additional information or
  23  * have any questions.
  24  */
  25 
  26 package com.sun.mirror.declaration;
  27 
  28 import java.util.Map;
  29 import com.sun.mirror.type.AnnotationType;
  30 import com.sun.mirror.util.SourcePosition;
  31 
  32 
  33 /**
  34  * Represents an annotation.  An annotation associates a value with
  35  * each element of an annotation type.
  36  *
  37  * <p> Annotations should not be compared using reference-equality
  38  * ("<tt>==</tt>").  There is no guarantee that any particular
  39  * annotation will always be represented by the same object.
  40  *





  41  * @author Joseph D. Darcy
  42  * @author Scott Seligman
  43  * @since 1.5
  44  */
  45 

  46 public interface AnnotationMirror {
  47 
  48     /**
  49      * Returns the annotation type of this annotation.
  50      *
  51      * @return the annotation type of this annotation
  52      */
  53     AnnotationType getAnnotationType();
  54 
  55     /**
  56      * Returns the source position of the beginning of this annotation.
  57      * Returns null if the position is unknown or not applicable.
  58      *
  59      * <p>This source position is intended for use in providing diagnostics,
  60      * and indicates only approximately where an annotation begins.
  61      *
  62      * @return  the source position of the beginning of this annotation or
  63      * null if the position is unknown or not applicable
  64      */
  65     SourcePosition getPosition();


  21  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  22  * CA 95054 USA or visit www.sun.com if you need additional information or
  23  * have any questions.
  24  */
  25 
  26 package com.sun.mirror.declaration;
  27 
  28 import java.util.Map;
  29 import com.sun.mirror.type.AnnotationType;
  30 import com.sun.mirror.util.SourcePosition;
  31 
  32 
  33 /**
  34  * Represents an annotation.  An annotation associates a value with
  35  * each element of an annotation type.
  36  *
  37  * <p> Annotations should not be compared using reference-equality
  38  * ("<tt>==</tt>").  There is no guarantee that any particular
  39  * annotation will always be represented by the same object.
  40  *
  41  * @deprecated All components of this API have been superseded by the
  42  * standardized annotation processing API.  The replacement for the
  43  * functionality of this interface is {@link
  44  * javax.lang.model.element.AnnotationMirror}.
  45  *
  46  * @author Joseph D. Darcy
  47  * @author Scott Seligman
  48  * @since 1.5
  49  */
  50 @Deprecated
  51 @SuppressWarnings("deprecation")
  52 public interface AnnotationMirror {
  53 
  54     /**
  55      * Returns the annotation type of this annotation.
  56      *
  57      * @return the annotation type of this annotation
  58      */
  59     AnnotationType getAnnotationType();
  60 
  61     /**
  62      * Returns the source position of the beginning of this annotation.
  63      * Returns null if the position is unknown or not applicable.
  64      *
  65      * <p>This source position is intended for use in providing diagnostics,
  66      * and indicates only approximately where an annotation begins.
  67      *
  68      * @return  the source position of the beginning of this annotation or
  69      * null if the position is unknown or not applicable
  70      */
  71     SourcePosition getPosition();