Initial upgrade to Platform/JDT 3.4.1
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / core / dom / IPackageBinding.java
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
7  *
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *******************************************************************************/
11
12 package net.sourceforge.phpdt.core.dom;
13
14 /**
15  * A package binding represents a named or unnamed package.
16  * 
17  * @since 2.0
18  * @noimplement This interface is not intended to be implemented by clients.
19  */
20 public interface IPackageBinding extends IBinding {
21
22         /**
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.
26          * 
27          * @return the name of the package represented by this binding, or
28          *    an empty string for an unnamed package
29          */
30         public String getName();
31         
32         /**
33          * Returns whether this package is an unnamed package.
34          * See <em>The Java Language Specification</em> section 7.4.2 for details.
35          *
36          * @return <code>true</code> if this is an unnamed package, and
37          *    <code>false</code> otherwise
38          */
39         public boolean isUnnamed();
40         
41         /**
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.
46          * 
47          * @return the name of the package represented by this binding, or the
48          *    empty list for unnamed packages
49          */
50         public String[] getNameComponents();
51         
52 //      /**
53 //       * Finds and returns the binding for the class or interface with the given
54 //       * name declared in this package.
55 //       * <p>
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>).
61 //       * </p>
62 //       *
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
67 //       */
68 //      public ITypeBinding findTypeBinding(String name);
69 }