EclipseJDT Source Viewer

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