|
Jode 1.90-CVS Build Aug 6, 2004 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jode.bytecode.ClassPath.Location
A location is a single component of the ClassPath. It provides
methods to find files, list all files and reading them.
Files and directories are always separated by "/" in this class,
even under Windows where the default is a "\". This behaviour
is consistent with that of ZipFile
.
You can extend this class to provide your own custom locations.
Constructor Summary | |
ClassPath.Location()
|
Method Summary | |
protected boolean |
exists(java.lang.String file)
Tells whether there exists a file or directory with the given name at this location. |
protected java.io.InputStream |
getFile(java.lang.String file)
Returns an input stream that reads the given file. |
protected boolean |
isDirectory(java.lang.String file)
Tells whether there exists a directory (or package) with the given name at this location. |
protected java.util.Enumeration |
listFiles(java.lang.String directory)
Lists the files and subdirectory in a directory. |
protected boolean |
loadClass(ClassInfo clazz,
int howMuch)
Loads a class from this location and fills it with the given information. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ClassPath.Location()
Method Detail |
protected boolean exists(java.lang.String file)
file
- the name of the file, directories are always
separated by "/".
protected boolean isDirectory(java.lang.String file)
file
- the name of the directory, subdirectories are always
separated by "/".
protected java.io.InputStream getFile(java.lang.String file) throws java.io.IOException
file
- the name of the file, subdirectories are always
separated by "/".
java.io.IOException
- if an io exception occured while opening
the file.protected java.util.Enumeration listFiles(java.lang.String directory)
ClassPath.listClassesAndPackages(java.lang.String)
.
directory
- the name of the directory, subdirectories
are always separated by "/".
protected boolean loadClass(ClassInfo clazz, int howMuch) throws java.io.IOException, ClassFormatException
clazz
- the dot separated full qualified class name.howMuch
- the amount of information to load
ClassFormatException
- if class format is illegal
java.io.IOException
- if an io exception occured while reading
the class.ClassInfo.read(java.io.DataInputStream, int)
|
Jode 1.90-CVS Build Aug 6, 2004 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |