|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgate.util.Javac
This class copiles a set of java sources by accessing the java compiler from tools.jar file in the jdk. All processing is done without touching the disk.
Field Summary | |
protected static GateClassLoader |
classLoader
|
Constructor Summary | |
Javac()
|
Method Summary | |
protected static File |
getDirectory(File workDir,
List pathComponents)
Gets a file inside a parent directory from a list of path components. |
protected static List |
getPathComponents(String classname)
Breaks a class name into path components. |
protected static void |
loadAllClasses(File classesDirectory,
String packageName)
Loads the entire hierarchy of classes found in a parent directory. |
static void |
loadClasses(Map sources)
Compiles a set of java sources and loads the compiled classes in the gate class loader. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static GateClassLoader classLoader
Constructor Detail |
public Javac()
Method Detail |
public static void loadClasses(Map sources) throws GateException
sources
- a map from fully qualified classname to java source
GateException
- in case of a compilation error or warning.
In the case of warnings the compiled classes are loaded before the error is
raised.protected static List getPathComponents(String classname)
classname
-
protected static File getDirectory(File workDir, List pathComponents)
workDir
- pathComponents
-
protected static void loadAllClasses(File classesDirectory, String packageName) throws IOException
classesDirectory
-
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |