org.openide.src
Class Import

java.lang.Object
  |
  +--org.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.

CLASS

public static final boolean CLASS
A class import.
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.
Overrides:
toString in class Object
Returns:
e.g. import com.mycom.Class or import com.mycom.*

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Returns:
the hash code for this import

equals

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


Built on December 12 2001.  |  Portions Copyright 1997-2001 Sun Microsystems, Inc. All rights reserved.