|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.sphinx.tools.gui.util.ClassFinder
public class ClassFinder
This class is used mainly to facilitate scanning all the folders of sphinx system, and to filter classes that are Configurable (implements 'edu.cmu.sphinx.util.props.Configurable' in one of the ancestors) and are not of Interface type.
This class is used by ModelBuilder, and contains only static methods
Constructor Summary | |
---|---|
ClassFinder()
|
Method Summary | |
---|---|
static void |
findClasses(java.lang.String startDir,
java.lang.String startPackage,
java.util.Set classList)
find a list of java classes inside 'startDir', that meets the ancestor and fields requirement for the model recursively goes down to the bottom level |
static java.io.BufferedReader |
findFile(java.lang.String filename)
find a File, open it and return the content as BufferedReader |
static java.util.List |
findFolder(java.lang.String startDir)
find a list of folder names that are directly under 'startDir', not recursive |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClassFinder()
Method Detail |
---|
public static java.io.BufferedReader findFile(java.lang.String filename) throws java.lang.ClassNotFoundException, java.io.FileNotFoundException
filename
- name of file to be found
java.lang.ClassNotFoundException
java.io.FileNotFoundException
public static java.util.List findFolder(java.lang.String startDir) throws java.lang.ClassNotFoundException, java.io.FileNotFoundException
startDir
- String name of directory to start the search from
java.lang.ClassNotFoundException
- the class we're looking for is not found
java.io.FileNotFoundException
- the folder does not existpublic static void findClasses(java.lang.String startDir, java.lang.String startPackage, java.util.Set classList) throws java.lang.ClassNotFoundException, java.io.FileNotFoundException
startDir
- String name directory to liststartPackage
- String preceeding package namesclassList
- Set of .class files e.g. "nextDir.nextclass", that passes the filter, and will be in the
model startDir and '.class' extension not included as package name
ClassNotFoundException,
- FileNotFoundException
java.lang.ClassNotFoundException
java.io.FileNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |