1 /*******************************************************************************
2 * Copyright (c) 2000, 2008 IBM Corporation and others.
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 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
12 package net.sourceforge.phpdt.core.dom;
15 * A package binding represents a named or unnamed package.
18 * @noimplement This interface is not intended to be implemented by clients.
20 public interface IPackageBinding extends IBinding {
23 * Returns the name of the package represented by this binding. For named
24 * packages, this is the fully qualified package name (using "." for
25 * separators). For unnamed packages, this is an empty string.
27 * @return the name of the package represented by this binding, or
28 * an empty string for an unnamed package
30 public String getName();
33 * Returns whether this package is an unnamed package.
34 * See <em>The Java Language Specification</em> section 7.4.2 for details.
36 * @return <code>true</code> if this is an unnamed package, and
37 * <code>false</code> otherwise
39 public boolean isUnnamed();
42 * Returns the list of name component making up the name of the package
43 * represented by this binding. For example, for the package named
44 * "com.example.tool", this method returns {"com", "example", "tool"}.
45 * Returns the empty list for unnamed packages.
47 * @return the name of the package represented by this binding, or the
48 * empty list for unnamed packages
50 public String[] getNameComponents();
53 // * Finds and returns the binding for the class or interface with the given
54 // * name declared in this package.
56 // * For top-level classes and interfaces, the name here is just the simple
57 // * name of the class or interface. For nested classes and interfaces, the
58 // * name is the VM class name (in other words, a name like
59 // * <code>"Outer$Inner"</code> as used to name the class file; see
60 // * <code>ITypeBinding.getName</code>).
63 // * @param name the name of a class or interface
64 // * @return the type binding for the class or interface with the
65 // * given name declared in this package, or <code>null</code>
66 // * if there is no such type
68 // public ITypeBinding findTypeBinding(String name);