KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > javadoc > AnnotationDesc


1 /*
2  * @(#)AnnotationDesc.java 1.3 04/04/08
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package com.sun.javadoc;
9
10
11 /**
12  * Represents an annotation.
13  * An annotation associates a value with each element of an annotation type.
14  *
15  * @author Scott Seligman
16  * @version 1.3 04/04/08
17  * @since 1.5
18  */

19 public interface AnnotationDesc {
20
21     /**
22      * Returns the annotation type of this annotation.
23      *
24      * @return the annotation type of this annotation.
25      */

26     AnnotationTypeDoc annotationType();
27
28     /**
29      * Returns this annotation's elements and their values.
30      * Only those explicitly present in the annotation are
31      * included, not those assuming their default values.
32      * Returns an empty array if there are none.
33      *
34      * @return this annotation's elements and their values.
35      */

36     ElementValuePair[] elementValues();
37
38
39     /**
40      * Represents an association between an annotation type element
41      * and one of its values.
42      *
43      * @author Scott Seligman
44      * @version 1.3 04/04/08
45      * @since 1.5
46      */

47     public interface ElementValuePair {
48
49     /**
50      * Returns the annotation type element.
51      *
52      * @return the annotation type element.
53      */

54     AnnotationTypeElementDoc element();
55
56     /**
57      * Returns the value associated with the annotation type element.
58      *
59      * @return the value associated with the annotation type element.
60      */

61     AnnotationValue value();
62     }
63 }
64
Popular Tags