| java.lang.Object com.caucho.loader.Loader com.caucho.loader.CompilingLoader
CompilingLoader | public class CompilingLoader extends Loader implements Make(Code) | | A class loader that automatically compiles Java.
|
Method Summary | |
public void | addArg(String arg) Adds an argument. | protected void | buildClassPath(ArrayList<String> pathList) | boolean | checkSource(Path sourceDir, String javaName) Checks that the case is okay for the source. | void | compileBatch(String[] files, boolean isMake) Compile the Java source. | void | compileClass(Path javaSource, Path javaClass, String sourcePath, boolean isMake) Compile the Java source. | public static DynamicClassLoader | create(Path path) | public static DynamicClassLoader | create(ClassLoader parent, Path classDir, Path sourceDir, String args, String encoding) | protected ClassEntry | getClassEntry(String name, String pathName) Loads the specified class, compiling if necessary. | public String | getClassPath() | protected CodeSource | getCodeSource(Path path) Returns the code source for the directory. | public Path | getPath() Gets the class path. | public Path | getPath(String name) Returns the path for the given name. | public Path | getSource() Sets the source path. | public void | init() Initialize. | public void | make() Compiles all changed files in the class directory. | protected String | prefixClassPath(String tail) | public void | setArgs(String arg) Sets the arguments. | public void | setBatch(boolean isBatch) Sets true if compilation should batch as many files as possible. | public void | setCompiler(String compiler) Sets the compiler. | public void | setEncoding(String encoding) Sets the encoding. | public void | setLoader(DynamicClassLoader loader) Sets the owning class loader. | public void | setPath(Path path) Sets the class path. | public void | setRequireSource(boolean requireSource) Sets true if source is required. | public void | setSource(Path path) Sets the source path. | public void | setSourceExtension(String ext) Sets the source extension. | public String | toString() |
CompilingLoader | public CompilingLoader()(Code) | | |
CompilingLoader | public CompilingLoader(Path classDir)(Code) | | Creates a new compiling class loader
Parameters: classDir - generated class directory root |
CompilingLoader | public CompilingLoader(Path classDir, Path sourceDir, String args, String encoding)(Code) | | Creates a new compiling class loader
Parameters: classDir - generated class directory root Parameters: sourceDir - Java source directory root Parameters: args - Javac arguments Parameters: encoding - javac encoding |
addArg | public void addArg(String arg)(Code) | | Adds an argument.
|
buildClassPath | protected void buildClassPath(ArrayList<String> pathList)(Code) | | Adds the classpath we're responsible for to the classpath
Parameters: head - the overriding classpath the new classpath |
checkSource | boolean checkSource(Path sourceDir, String javaName)(Code) | | Checks that the case is okay for the source.
|
compileBatch | void compileBatch(String[] files, boolean isMake) throws ClassNotFoundException(Code) | | Compile the Java source. Compile errors are encapsulated in a
ClassNotFound wrapper.
|
compileClass | void compileClass(Path javaSource, Path javaClass, String sourcePath, boolean isMake) throws ClassNotFoundException(Code) | | Compile the Java source. Compile errors are encapsulated in a
ClassNotFound wrapper.
Parameters: javaSource - path to the Java source |
create | public static DynamicClassLoader create(Path path)(Code) | | Create a class loader based on the compiling loader
Parameters: path - traditional classpath the new ClassLoader |
create | public static DynamicClassLoader create(ClassLoader parent, Path classDir, Path sourceDir, String args, String encoding)(Code) | | Creates a new compiling class loader
Parameters: classDir - generated class directory root Parameters: sourceDir - Java source directory root Parameters: args - Javac arguments Parameters: encoding - javac encoding |
getCodeSource | protected CodeSource getCodeSource(Path path)(Code) | | Returns the code source for the directory.
|
getPath | public Path getPath()(Code) | | Gets the class path.
|
getPath | public Path getPath(String name)(Code) | | Returns the path for the given name.
Parameters: name - the name of the class |
getSource | public Path getSource()(Code) | | Sets the source path.
|
init | public void init() throws ConfigException(Code) | | Initialize.
|
setArgs | public void setArgs(String arg)(Code) | | Sets the arguments.
|
setBatch | public void setBatch(boolean isBatch)(Code) | | Sets true if compilation should batch as many files as possible.
|
setCompiler | public void setCompiler(String compiler) throws ConfigException(Code) | | Sets the compiler.
|
setEncoding | public void setEncoding(String encoding)(Code) | | Sets the encoding.
|
setPath | public void setPath(Path path)(Code) | | Sets the class path.
|
setRequireSource | public void setRequireSource(boolean requireSource)(Code) | | Sets true if source is required.
|
setSource | public void setSource(Path path)(Code) | | Sets the source path.
|
setSourceExtension | public void setSourceExtension(String ext) throws ConfigException(Code) | | Sets the source extension.
|
|
|