|
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.Query
javafe.filespace.SlowQuery
This module implements the Query "interface" by using the Java filespace classes (ClassPath, PathComponent, etc.) provided by the javafe.filespace package.
Field Summary | |
private Tree |
javaFileSpace
The Java file space that corresponds to our classpath. |
Constructor Summary | |
SlowQuery()
Create an query engine that may be queried about packages and classes in the current Java classpath (cf. |
|
SlowQuery(java.lang.String classpath)
Create an query engine that may be queried about packages and classes in the classpath classpath. |
Method Summary | |
boolean |
accessable(java.lang.String[] P)
Return true iff the package P in the Java filespace is "accessible". |
GenericFile |
findFile(java.lang.String[] P,
java.lang.String filename)
|
GenericFile |
findFile(java.lang.String[] P,
java.lang.String typename,
java.lang.String extension)
Attempt to locate the file typename+"." |
GenericFile |
findFile(java.lang.String[] P,
java.lang.String typename,
java.lang.String[] extensions)
Locates a file with given package, typename, and one of the given extensions; the first directory on the search path containing a candidate file is used - within that directory, extensions near the beginning of the extensions Vector take precedence. |
java.util.Enumeration |
findFiles(java.lang.String[] P)
Returns an Enumeration containing GenericFile objects representing all the files in the given package P. |
private Tree |
getPackage(java.lang.String[] P)
|
static void |
main(java.lang.String[] args)
A simple test driver |
Methods inherited from class javafe.filespace.Query |
exists |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private Tree javaFileSpace
Constructor Detail |
public SlowQuery(java.lang.String classpath) throws java.io.IOException
public SlowQuery() throws java.io.IOException
Method Detail |
public boolean accessable(java.lang.String[] P)
Warning: the definition of accessible is host system dependent and may in fact be defined as always true.
accessable
in class Query
public GenericFile findFile(java.lang.String[] P, java.lang.String typename, java.lang.String extension)
If such a file is found, then a (non-null) GenericFile representing it is returned. Otherwise, null is returned.
findFile
in class Query
public GenericFile findFile(java.lang.String[] P, java.lang.String filename)
findFile
in class Query
public GenericFile findFile(java.lang.String[] P, java.lang.String typename, java.lang.String[] extensions)
Query
findFile
in class Query
public java.util.Enumeration findFiles(java.lang.String[] P)
Query
findFiles
in class Query
private Tree getPackage(java.lang.String[] P)
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 |