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
9 * tyeung@bea.com - initial API and implementation
10 * IBM Corporation - implemented methods from IBinding
11 * IBM Corporation - renamed from ResolvedDefaultValuePair to DefaultValuePairBinding
12 *******************************************************************************/
13 package net.sourceforge.phpdt.core.dom;
15 import net.sourceforge.phpdt.core.dom.BindingResolver;
16 import net.sourceforge.phpdt.core.dom.IMethodBinding;
19 * Member value pair which compose of default values.
21 class DefaultValuePairBinding extends MemberValuePairBinding {
23 private net.sourceforge.phpdt.internal.compiler.lookup.MethodBinding method;
25 DefaultValuePairBinding(net.sourceforge.phpdt.internal.compiler.lookup.MethodBinding binding, BindingResolver resolver) {
26 super(null, resolver);
27 this.method = binding;
28 this.value = MemberValuePairBinding.buildDOMValue(binding.getDefaultValue(), resolver);
31 public IMethodBinding getMethodBinding() {
32 return this.bindingResolver.getMethodBinding(this.method);
35 public String getName() {
36 return new String(this.method.selector);
39 public Object getValue() {
43 public boolean isDefault() {
47 public boolean isDeprecated() {
48 return this.method.isDeprecated();