|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcode.loader.CurryModulePath
public class CurryModulePath
This class encapsulates PATHS where source files can be located. one initializes CurryModulePath by appending "paths" to it. then one can "ask" the CurryModulePath object to provide a complete path to some fileName.
Currently all members of this class will be static. This implies that there is exactly one CurryModulePath. Primary user of this class LoadManager. Other user is the Command class in loop package.
| Field Summary | |
|---|---|
static int |
CURRYPATH
|
private static java.util.Vector<java.lang.String> |
curryPaths
A Static data member that holds all the normalized paths that should be searched when loading a module. |
static int |
NATIVEPATH
|
private static java.util.Vector<java.lang.String> |
nativePaths
|
static int |
NATIVEPKG
|
private static java.util.Vector<java.lang.String> |
nativePkgs
|
| Constructor Summary | |
|---|---|
private |
CurryModulePath()
|
| Method Summary | |
|---|---|
private static void |
append(java.lang.String[] paths)
Appends each element of the paths array to ModulePath. |
static void |
append(java.lang.String path,
int pathType)
Add the specified path(s) to the CurryModulePath. |
static void |
appendPkgs(java.lang.String path)
|
static java.lang.String |
getFilePath(java.lang.String moduleName)
Search the CurryModulePath for file containing this module and return the complete path of that file. |
private static java.lang.String |
getNormalizedPath(java.lang.String somePath)
Returns the normalized path of the specified path. |
private static boolean |
pathExists(java.lang.String path,
int pathType)
Returns true if the specified path already exists in the CurryModulePath. |
static void |
remove(java.lang.String path)
Removes the specified path(s) from CurryModulePath. |
static void |
set(java.lang.String path)
Set the CurryModulePath to the specified path. |
static void |
show(java.io.Writer out)
Shows/Prints the contents of the CurryModulePath on the specified PrintStream. |
static java.lang.String |
showPaths()
|
private static java.lang.String[] |
splitPath(java.lang.String path,
int pathType)
Split a colon (:) separated string into an array of strings. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static java.util.Vector<java.lang.String> curryPaths
private static java.util.Vector<java.lang.String> nativePaths
private static java.util.Vector<java.lang.String> nativePkgs
public static final int CURRYPATH
public static final int NATIVEPATH
public static final int NATIVEPKG
| Constructor Detail |
|---|
private CurryModulePath()
| Method Detail |
|---|
public static void append(java.lang.String path,
int pathType)
throws java.io.IOException
path - A Colon separated list of paths.
java.io.IOException
public static void appendPkgs(java.lang.String path)
throws java.io.IOException
java.io.IOException
public static java.lang.String getFilePath(java.lang.String moduleName)
throws ModFileNotFoundException,
ModFileDuplicatedException
ModFileNotFoundException
ModFileDuplicatedExceptionpublic static void show(java.io.Writer out)
out - a PrintStream on which to show the contents of
CurryModulePath.public static java.lang.String showPaths()
public static void set(java.lang.String path)
public static void remove(java.lang.String path)
path - The path(s) that should be removed from CurryModulePath
private static void append(java.lang.String[] paths)
throws java.io.IOException
paths - An array of paths, each of which is assumed to
be not Colon separated.
java.io.IOException
private static java.lang.String[] splitPath(java.lang.String path,
int pathType)
throws java.io.IOException
path - A Colon Separated Path
java.io.IOException
private static java.lang.String getNormalizedPath(java.lang.String somePath)
throws java.io.IOException
somePath - Some path whose Normalized path is desired.
java.io.IOException
private static boolean pathExists(java.lang.String path,
int pathType)
path - The path that should be checked for existance
in CurryModulePath
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||