|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.backtrack.util.PathFinder
public class PathFinder
A tool to search paths and set up class paths. It provides functions to search paths for certain files, and set up customized class paths from which class can be loaded with ptolemy.backtrack.eclipse.ast.LocalClassLoader.
Red (tfeng) |
Red (tfeng) |
Nested Class Summary | |
---|---|
static class |
PathFinder.DirectoryFilter
Filter out all the files in a directory, except for sub-directories. |
static class |
PathFinder.PostfixFilter
Filter out all the files in a directory, except for those ending with the given postfix. |
Field Summary | |
---|---|
private static java.lang.String |
_ptolemyPath
The Ptolemy path. |
Constructor Summary | |
---|---|
PathFinder()
|
Method Summary | |
---|---|
static java.io.File[] |
getJavaFiles(java.lang.String path,
boolean subdirs)
Get all the Java source files in a path. |
static java.lang.String[] |
getPtClassPaths()
Return the class paths containing the root of the Ptolemy tree, and the Jar files in sub-directories lib/, vendors/sun/commapi/ and vendors/sun/jxta. |
static java.lang.String |
getPtolemyPath()
Get the Ptolemy path. |
static void |
setPtolemyPath(java.lang.String path)
Set the Ptolemy path. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static java.lang.String _ptolemyPath
Constructor Detail |
---|
public PathFinder()
Method Detail |
---|
public static java.io.File[] getJavaFiles(java.lang.String path, boolean subdirs)
path
- The path to be searched.subdirs
- If true, sub-directories of the path are
also searched.
public static java.lang.String[] getPtClassPaths()
public static java.lang.String getPtolemyPath()
setPtolemyPath(String)
, that path is returned. If it is not set,
ptolemy.ptII.dir system property is used (see StringUtilities.getProperty(String)
). If the property does not exist,
simply "./" is returned, assuming that the current path contains a
working version of Ptolemy (may not be correct).
setPtolemyPath(String)
public static void setPtolemyPath(java.lang.String path)
path
- The Ptolemy path.getPtolemyPath()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |