1 /*******************************************************************************
2 * Copyright (c) 2005, 2008 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
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 net.sourceforge.phpdt.core.dom;
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.
21 * @noimplement This interface is not intended to be implemented by clients.
23 public interface IMemberValuePairBinding extends IBinding {
25 * Returns the name of the annotation type member.
27 * @return the name of the member
29 public String getName();
32 * Returns the method binding corresponding to the named annotation type member.
34 * @return the method binding for the annotation type member
36 public IMethodBinding getMethodBinding();
39 * Returns the resolved value. Resolved values are represented as follows:
41 * <li>Primitive type - the equivalent boxed object</li>
42 * <li>java.lang.Class - the <code>ITypeBinding</code> for the class object</li>
43 * <li>java.lang.String - the string value itself</li>
44 * <li>enum type - the <code>IVariableBinding</code> for the enum constant</li>
45 * <li>annotation type - an <code>IAnnotationBinding</code></li>
46 * <li>array type - an <code>Object[]</code> whose elements are as per above
47 * (the language only allows single dimensional arrays in annotations)</li>
50 * @return the resolved value, or <code>null</code> if none exists
52 public Object getValue();
55 * @return <code>true</code> iff this member value pair's value is the default value.
56 * Returns <code>false</code> otherwise.
58 public boolean isDefault();