1 /*******************************************************************************
2 * Copyright (c) 2000, 2003 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v10.html
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package net.sourceforge.phpdt.internal.compiler.lookup;
13 import net.sourceforge.phpdt.core.compiler.CharOperation;
14 import net.sourceforge.phpeclipse.internal.compiler.ast.ImportReference;
16 public class ImportBinding extends Binding {
17 public char[][] compoundName;
18 public boolean onDemand;
19 public ImportReference reference;
21 Binding resolvedImport; // must ensure the import is resolved
23 public ImportBinding(char[][] compoundName, boolean isOnDemand, Binding binding, ImportReference reference) {
24 this.compoundName = compoundName;
25 this.onDemand = isOnDemand;
26 this.resolvedImport = binding;
27 this.reference = reference;
30 * Answer the receiver's binding type from Binding.BindingID.
33 public final int bindingType() {
36 public char[] readableName() {
38 return CharOperation.concat(CharOperation.concatWith(compoundName, '.'), ".*".toCharArray()); //$NON-NLS-1$
40 return CharOperation.concatWith(compoundName, '.');
42 public String toString() {
43 return "import : " + new String(readableName()); //$NON-NLS-1$