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 IResolvedMemberValuePair to IMemberValuePairBinding
12: *******************************************************************************/package org.eclipse.jdt.core.dom;
13:
14: /**
15: * Represents a resolved instance of an annotation's member value pair.
16: * Resolved annotation are computed along with other bindings; these objects
17: * correspond to {@link MemberValuePair} 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 IMemberValuePairBinding extends IBinding {
25: /**
26: * Returns the name of the annotation type member.
27: *
28: * @return the name of the member
29: */
30: public String getName();
31:
32: /**
33: * Returns the method binding corresponding to the named annotation type member.
34: *
35: * @return the method binding for the annotation type member
36: */
37: public IMethodBinding getMethodBinding();
38:
39: /**
40: * Returns the resolved value. Resolved values are represented as follows:
41: * <ul>
42: * <li>Primitive type - the equivalent boxed object</li>
43: * <li>java.lang.Class - the <code>ITypeBinding</code> for the class object</li>
44: * <li>java.lang.String - the string value itself</li>
45: * <li>enum type - the <code>IVariableBinding</code> for the enum constant</li>
46: * <li>annotation type - an <code>IAnnotationBinding</code></li>
47: * <li>array type - an <code>Object[]</code> whose elements are as per above
48: * (the language only allows single dimensional arrays in annotations)</li>
49: * </ul>
50: *
51: * @return the resolved value, or <code>null</code> if none exists
52: */
53: public Object getValue();
54:
55: /**
56: * @return <code>true</code> iff this member value pair's value is the default value.
57: * Returns <code>false</code> otherwise.
58: */
59: public boolean isDefault();
60: }
|