站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 5.0.0

Import (NetBeans Java Hierarchy API) - NetBeans API Javadoc 5.0.0

 

org.openide.src
Class Import

java.lang.Object
  extended byorg.openide.src.Import
All Implemented Interfaces:
Serializable

public class Import
extends Object
implements Serializable

Represents one class or package import.

See Also:
Serialized Form

Field Summary
static boolean CLASS
          A class import.
static boolean PACKAGE
          A package import.
 
Constructor Summary
Import(Identifier id, boolean wholePackage)
          Create an import.
 
Method Summary
 boolean equals(Object o)
           
 Identifier getIdentifier()
          Get the name of the import.
 int hashCode()
           
 boolean isClass()
          Is this a class import?
 boolean isPackage()
          Is this a package import?
 String toString()
          Get this import as a string.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

PACKAGE

public static final boolean PACKAGE
A package import.

See Also:
Constant Field Values

CLASS

public static final boolean CLASS
A class import.

See Also:
Constant Field Values
Constructor Detail

Import

public Import(Identifier id,
              boolean wholePackage)
Create an import.

Parameters:
id - the name of the class or package imported
wholePackage - one of PACKAGE or CLASS
Method Detail

isPackage

public boolean isPackage()
Is this a package import?

Returns:
true if so

isClass

public boolean isClass()
Is this a class import?

Returns:
true if so

getIdentifier

public Identifier getIdentifier()
Get the name of the import.

Returns:
the identifier which is imported

toString

public String toString()
Get this import as a string.

Returns:
e.g. import com.mycom.Class or import com.mycom.*

hashCode

public int hashCode()
Returns:
the hash code for this import

equals

public boolean equals(Object o)
Returns:
true if the specified object is also Import of the same class or package.

 

Built on May 3 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.