KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > core > dom > IPackageBinding


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 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 org.eclipse.jdt.core.dom;
13
14 /**
15  * A package binding represents a named or unnamed package.
16  * <p>
17  * This interface is not intended to be implemented by clients.
18  * </p>
19  *
20  * @since 2.0
21  */

22 public interface IPackageBinding extends IBinding {
23
24     /**
25      * Returns the name of the package represented by this binding. For named
26      * packages, this is the fully qualified package name (using "." for
27      * separators). For unnamed packages, this is an empty string.
28      *
29      * @return the name of the package represented by this binding, or
30      * an empty string for an unnamed package
31      */

32     public String JavaDoc getName();
33     
34     /**
35      * Returns whether this package is an unnamed package.
36      * See <em>The Java Language Specification</em> section 7.4.2 for details.
37      *
38      * @return <code>true</code> if this is an unnamed package, and
39      * <code>false</code> otherwise
40      */

41     public boolean isUnnamed();
42     
43     /**
44      * Returns the list of name component making up the name of the package
45      * represented by this binding. For example, for the package named
46      * "com.example.tool", this method returns {"com", "example", "tool"}.
47      * Returns the empty list for unnamed packages.
48      *
49      * @return the name of the package represented by this binding, or the
50      * empty list for unnamed packages
51      */

52     public String JavaDoc[] getNameComponents();
53     
54 // /**
55
// * Finds and returns the binding for the class or interface with the given
56
// * name declared in this package.
57
// * <p>
58
// * For top-level classes and interfaces, the name here is just the simple
59
// * name of the class or interface. For nested classes and interfaces, the
60
// * name is the VM class name (in other words, a name like
61
// * <code>"Outer$Inner"</code> as used to name the class file; see
62
// * <code>ITypeBinding.getName</code>).
63
// * </p>
64
// *
65
// * @param name the name of a class or interface
66
// * @return the type binding for the class or interface with the
67
// * given name declared in this package, or <code>null</code>
68
// * if there is no such type
69
// */
70
// public ITypeBinding findTypeBinding(String name);
71
}
72
Popular Tags