|
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 |
java.lang.Objectjavafe.filespace.ClassPath
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 |
public ClassPath()
Method Detail |
public static java.lang.String current()
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.)
public static void set(java.lang.String newClassPath)
java.class.path
.
public static Tree open(java.lang.String classpath, boolean complain) throws java.io.IOException
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.
java.io.IOException
public static Tree open(boolean complain) throws java.io.IOException
Iff complain is set, we throw IOException
s if
non-existent or ill-formed path components are present in the
classpath.
java.io.IOException
public static void displayPackage(Tree P)
P
- must be a filespace filtered via PkgTree
;
moreover PkgTree.isPackage(P)
should be true.public static void main(java.lang.String[] args) throws java.io.IOException
java.io.IOException
|
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 |