KickJava   Java API By Example, From Geeks To Geeks.

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


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 IResolvedMemberValuePair to IMemberValuePairBinding
12  *******************************************************************************/

13 package org.eclipse.jdt.core.dom;
14
15 /**
16  * Represents a resolved instance of an annotation's member value pair.
17  * Resolved annotation are computed along with other bindings; these objects
18  * correspond to {@link MemberValuePair} nodes.
19  * <p>
20  * This interface is not intended to be implemented by clients.
21  * </p>
22  *
23  * @since 3.2
24  */

25 public interface IMemberValuePairBinding extends IBinding {
26 /**
27  * Returns the name of the annotation type member.
28  *
29  * @return the name of the member
30  */

31 public String JavaDoc getName();
32
33 /**
34  * Returns the method binding corresponding to the named annotation type member.
35  *
36  * @return the method binding for the annotation type member
37  */

38 public IMethodBinding getMethodBinding();
39
40 /**
41  * Returns the resolved value. Resolved values are represented as follows:
42  * <ul>
43  * <li>Primitive type - the equivalent boxed object</li>
44  * <li>java.lang.Class - the <code>ITypeBinding</code> for the class object</li>
45  * <li>java.lang.String - the string value itself</li>
46  * <li>enum type - the <code>IVariableBinding</code> for the enum constant</li>
47  * <li>annotation type - an <code>IAnnotationBinding</code></li>
48  * <li>array type - an <code>Object[]</code> whose elements are as per above
49  * (the language only allows single dimensional arrays in annotations)</li>
50  * </ul>
51  *
52  * @return the resolved value, or <code>null</code> if none exists
53  */

54 public Object JavaDoc getValue();
55
56 /**
57  * @return <code>true</code> iff this member value pair's value is the default value.
58  * Returns <code>false</code> otherwise.
59  */

60 public boolean isDefault();
61 }
62
Popular Tags