KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > core > dom > IAnnotationBinding


1 /*******************************************************************************
2  * Copyright (c) 2005, 2007 BEA Systems, Inc.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * tyeung@bea.com - initial API and implementation
10  * IBM Corporation - changed interface to extend IBinding
11  * IBM Corporation - renamed from IResolvedAnnotation to IAnnotationBinding
12  *******************************************************************************/

13 package org.eclipse.jdt.core.dom;
14
15 /**
16  * Represents an resolved annotation. Resolved annotation are computed along with other
17  * bindings; they correspond to {@link Annotation} nodes.
18  * <p>
19  * This interface is not intended to be implemented by clients.
20  * </p>
21  *
22  * @since 3.2
23  */

24 public interface IAnnotationBinding extends IBinding {
25
26     /**
27      * Returns the complete list of member value pairs for this annotation, including
28      * ones explicitly listed in the annotation as well as entries for
29      * annotation type members with default values that are implied.
30      *
31      * @return a possibly empty list of resolved member value pairs
32      */

33     IMemberValuePairBinding[] getAllMemberValuePairs();
34     
35     /**
36      * Returns the type of the annotation. The resulting type binding will always
37      * return <code>true</code> to <code>ITypeBinding.isAnnotation()</code>.
38      *
39      * @return the type of the annotation
40      */

41     ITypeBinding getAnnotationType();
42     
43     /**
44      * Returns the list of declared member value pairs for this annotation.
45      * Returns an empty list for a {@link MarkerAnnotation}, a one element
46      * list for a {@link SingleMemberAnnotation}, and one entry for each
47      * of the explicitly listed values in a {@link NormalAnnotation}.
48      * <p>
49      * Note that the list only includes entries for annotation type members that are
50      * explicitly mentioned in the annotation. The list does not include any
51      * annotation type members with default values that are merely implied.
52      * Use {@link #getAllMemberValuePairs()} to get those as well.
53      * </p>
54      *
55      * @return a possibly empty list of resolved member value pairs
56      */

57     IMemberValuePairBinding[] getDeclaredMemberValuePairs();
58     
59     /**
60      * Returns the name of the annotation type.
61      *
62      * @return the name of the annotation type
63      */

64     public String JavaDoc getName();
65     
66 }
67
Popular Tags