Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ESC/Java2 © 2003,2004,2005 David Cok and Joseph Kiniry © 2005 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javafe.filespace
Class ClassPath

    java.lang.Object
      javafe.filespace.ClassPath

public class ClassPath
extends java.lang.Object

Functions for dealing with classpaths.

Constructor Summary
`ClassPath()`

Method Summary
`static java.lang.String` | `current()` Return our current classpath; if the Java system property `java.class.path.skip` is set to n, we ignore the first n components of the path.
`static void` | `displayPackage(Tree P)` A nicer, formatted version of print.
`static void` | `main(java.lang.String[] args)` A simple test driver
`static Tree` | `open(boolean complain)` Get the namespace specified by the current classpath using open; this is a convenience function.
`static Tree` | `open(java.lang.String classpath, boolean complain)` Get the filtered filespace (cf `PathComponent`) specified by a classpath.
`static void` | `set(java.lang.String newClassPath)` Set our current classpath by changing the property `java.class.path`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ClassPath

    public ClassPath()

Method Detail

### current

    public static java.lang.String current()

  Return our current classpath; if the Java system property `java.class.path.skip` is set to n, we ignore the first n components of the path.

  This makes it easier to write Java applications that use the classpath because we can append the path component containing the application binaries to the start of the classpath then remove them here, making it look like the classpath was not disturbed. (In particular, the automatic addition of the system libraries is not disturbed.)

### set

    public static void set(java.lang.String newClassPath)

  Set our current classpath by changing the property `java.class.path`.

### open

    public static Tree open(java.lang.String classpath,
                            boolean complain)
                     throws java.io.IOException

  Get the filtered filespace (cf `PathComponent`) specified by a classpath. (Filtering is performed using `PkgTree` on each of the path components before they are union'ed together).

  All `PkgTree` accessors and enumerators can be used on the resulting filespace.

  May throw an `IOException` if errors occur.

  Iff complain is set, we throw `IOException`s if non-existent or ill-formed path components are present in the classpath.

  Throws:
    `java.io.IOException`

### open

    public static Tree open(boolean complain)
                     throws java.io.IOException

  Get the namespace specified by the current classpath using open; this is a convenience function.

  Iff complain is set, we throw `IOException`s if non-existent or ill-formed path components are present in the classpath.

  Throws:
    `java.io.IOException`

### displayPackage

    public static void displayPackage(Tree P)

  A nicer, formatted version of print.

  Parameters:
    `P` - must be a filespace filtered via `PkgTree`; moreover `PkgTree.isPackage(P)` should be true.

### main

    public static void main(java.lang.String[] args)
                     throws java.io.IOException

  A simple test driver

  Throws:
    `java.io.IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ESC/Java2 © 2003,2004,2005 David Cok and Joseph Kiniry © 2005 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

The ESC/Java2 Project Homepage