org.openide.execution
Class NbClassPath

java.lang.Object
  |
  +--org.openide.execution.NbClassPath
All Implemented Interfaces:
Serializable

public final class NbClassPath
extends Object
implements Serializable

Property that can hold informations about class path and that can be used to create string representation of the class path.

See Also:
Serialized Form

Constructor Summary
NbClassPath(File[] classpathItems)
          Create a new descriptor for the specified process, classpath switch, and classpath.
NbClassPath(String path)
          Create a class path from the usual string representation.
NbClassPath(String[] classpathItems)
          Create a new descriptor for the specified process, classpath switch, and classpath.
 
Method Summary
static NbClassPath createBootClassPath()
          Creates path describing boot class path of the system.
static NbClassPath createClassPath()
          Creates class path of the system.
static NbClassPath createLibraryPath()
          Creates class path describing additional libraries needed by the system.
static NbClassPath createRepositoryPath()
          Method to obtain class path for the current state of the repository.
static NbClassPath createRepositoryPath(FileSystemCapability cap)
          Method to obtain class path for the current state of the repository.
 boolean equals(Object o)
           
 String getClassPath()
          Create class path representation.
 Exception[] getExceptions()
          If there were some problems during creation of the class path, they can be identified by asking the method.
static File toFile(FileObject fo)
          Deprecated. You probably should use FileUtil.toFile(org.openide.filesystems.FileObject) instead.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NbClassPath

public NbClassPath(String[] classpathItems)
Create a new descriptor for the specified process, classpath switch, and classpath.
Parameters:
classpathItems - the classpath to be passed to the process

NbClassPath

public NbClassPath(File[] classpathItems)
Create a new descriptor for the specified process, classpath switch, and classpath.
Parameters:
classpathItems - the classpath to be passed to the process

NbClassPath

public NbClassPath(String path)
Create a class path from the usual string representation.
Parameters:
path - a class path separated by File.pathSeparatorChars
Method Detail

createRepositoryPath

public static NbClassPath createRepositoryPath()
Method to obtain class path for the current state of the repository. The classpath should be scanned for all occured exception caused by file systems that cannot be converted to class path by a call to method getExceptions().
Returns:
class path for all reachable systems in the repository

createRepositoryPath

public static NbClassPath createRepositoryPath(FileSystemCapability cap)
Method to obtain class path for the current state of the repository. The classpath should be scanned for all occured exception caused by file systems that cannot be converted to class path by a call to method getExceptions().
Parameters:
cap - the capability that must be satisfied by the file system added to the class path
Returns:
class path for all reachable systems in the repository

createLibraryPath

public static NbClassPath createLibraryPath()
Creates class path describing additional libraries needed by the system.

createClassPath

public static NbClassPath createClassPath()
Creates class path of the system.

createBootClassPath

public static NbClassPath createBootClassPath()
Creates path describing boot class path of the system.
Returns:
class path of system class including extensions

toFile

public static File toFile(FileObject fo)
Deprecated. You probably should use FileUtil.toFile(org.openide.filesystems.FileObject) instead.

Take one file object and try to convert it into a local file. The conversion can succeed only if the file object's file system supports work with FileSystem.Environment.
Parameters:
fo - file object to convert
Returns:
disk file for that file object, or null if there is no corresponding disk file

getExceptions

public Exception[] getExceptions()
If there were some problems during creation of the class path, they can be identified by asking the method. So this method can be called to test whether it is correct to use the path or there can be some errors.

This can happen especially when creating NbClassPath for filesystems in repository and they are not stored on locally accessible disks.

Returns:
array of exceptions thrown during creation of the path

getClassPath

public String getClassPath()
Create class path representation.
Returns:
string representing the classpath items separated by File.separatorChar.

equals

public boolean equals(Object o)
Overrides:
equals in class Object


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