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

javafe.filespace
Class Query

java.lang.Object
  extended byjavafe.filespace.Query
Direct Known Subclasses:
SlowQuery

public abstract class Query
extends java.lang.Object

This module defines a very simple query interface for use in locating Java files according to a classpath.


Constructor Summary
Query()
           
 
Method Summary
 boolean accessable(java.lang.String[] P)
          Return true iff the package P in the Java filespace is "accessible".
 boolean exists(java.lang.String[] P, java.lang.String T)
          Return true iff the fully-qualified outside type P.T exists in our Java file space.
abstract  GenericFile findFile(java.lang.String[] P, java.lang.String filename)
           
abstract  GenericFile findFile(java.lang.String[] P, java.lang.String typename, java.lang.String extension)
          Attempt to locate the file typename+"."
abstract  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.
abstract  java.util.Enumeration findFiles(java.lang.String[] P)
          Returns an Enumeration containing GenericFile objects representing all the files in the given package P.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Query

public Query()
Method Detail

accessable

public boolean accessable(java.lang.String[] P)
Return true iff the package P in the Java filespace is "accessible".

Warning: the definition of accessible is host system dependent and may in fact be defined as always true.


findFile

public abstract GenericFile findFile(java.lang.String[] P,
                                     java.lang.String typename,
                                     java.lang.String extension)
Attempt to locate the file typename+"."+extension in the package P in the Java filespace.

If such a file is found, then a (non-null) GenericFile representing it is returned. Otherwise, null is returned.


findFile

public abstract GenericFile findFile(java.lang.String[] P,
                                     java.lang.String filename)

findFile

public abstract 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.


findFiles

public abstract java.util.Enumeration findFiles(java.lang.String[] P)
Returns an Enumeration containing GenericFile objects representing all the files in the given package P.


exists

public boolean exists(java.lang.String[] P,
                      java.lang.String T)
Return true iff the fully-qualified outside type P.T exists in our Java file space.


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

The ESC/Java2 Project Homepage