01: /*******************************************************************************
02: * Copyright (c) 2005, 2007 BEA Systems, Inc.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * tyeung@bea.com - initial API and implementation
10: * IBM Corporation - changed interface to extend IBinding
11: * IBM Corporation - renamed from IResolvedAnnotation to IAnnotationBinding
12: *******************************************************************************/package org.eclipse.jdt.core.dom;
13:
14: /**
15: * Represents an resolved annotation. Resolved annotation are computed along with other
16: * bindings; they correspond to {@link Annotation} nodes.
17: * <p>
18: * This interface is not intended to be implemented by clients.
19: * </p>
20: *
21: * @since 3.2
22: */
23: public interface IAnnotationBinding extends IBinding {
24:
25: /**
26: * Returns the complete list of member value pairs for this annotation, including
27: * ones explicitly listed in the annotation as well as entries for
28: * annotation type members with default values that are implied.
29: *
30: * @return a possibly empty list of resolved member value pairs
31: */
32: IMemberValuePairBinding[] getAllMemberValuePairs();
33:
34: /**
35: * Returns the type of the annotation. The resulting type binding will always
36: * return <code>true</code> to <code>ITypeBinding.isAnnotation()</code>.
37: *
38: * @return the type of the annotation
39: */
40: ITypeBinding getAnnotationType();
41:
42: /**
43: * Returns the list of declared member value pairs for this annotation.
44: * Returns an empty list for a {@link MarkerAnnotation}, a one element
45: * list for a {@link SingleMemberAnnotation}, and one entry for each
46: * of the explicitly listed values in a {@link NormalAnnotation}.
47: * <p>
48: * Note that the list only includes entries for annotation type members that are
49: * explicitly mentioned in the annotation. The list does not include any
50: * annotation type members with default values that are merely implied.
51: * Use {@link #getAllMemberValuePairs()} to get those as well.
52: * </p>
53: *
54: * @return a possibly empty list of resolved member value pairs
55: */
56: IMemberValuePairBinding[] getDeclaredMemberValuePairs();
57:
58: /**
59: * Returns the name of the annotation type.
60: *
61: * @return the name of the annotation type
62: */
63: public String getName();
64:
65: }
|