Eclipse JDT
2.0

org.eclipse.jdt.core.dom
Interface IPackageBinding

All Superinterfaces:
IBinding

public interface IPackageBinding
extends IBinding

A package binding represents a named or unnamed package.

This interface is not intended to be implemented by clients.

Since:
2.0

Field Summary
 
Fields inherited from interface org.eclipse.jdt.core.dom.IBinding
METHOD, PACKAGE, TYPE, VARIABLE
 
Method Summary
 String getName()
          Returns the name of the package represented by this binding.
 String[] getNameComponents()
          Returns the list of name component making up the name of the package represented by this binding.
 boolean isUnnamed()
          Returns whether this package is an unnamed package.
 
Methods inherited from interface org.eclipse.jdt.core.dom.IBinding
equals, getKey, getKind, getModifiers, isDeprecated, isSynthetic, toString
 

Method Detail

getName

public String getName()
Returns the name of the package represented by this binding. For named packages, this is the fully qualified package name (using "." for separators). For unnamed packages, this is a distinctive string that can be used to refer to this unnamed package (since there may in fact be multiple unnamed packages).

Specified by:
getName in interface IBinding
Returns:
the name of the package represented by this binding, or an internal identifier for an unnamed package

isUnnamed

public boolean isUnnamed()
Returns whether this package is an unnamed package. See The Java Language Specification section 7.4.2 for details.

Returns:
true if this is an unnamed package, and false otherwise

getNameComponents

public String[] getNameComponents()
Returns the list of name component making up the name of the package represented by this binding. For example, for the package named "com.example.tool", this method returns {"com", "example", "tool"}. Returns the empty list for unnamed packages.

Returns:
the name of the package represented by this binding, or the empty list for unnamed packages

Eclipse JDT
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.