| org.drools.commons.jci.compilers.JavaCompiler
All known Subclasses: org.drools.commons.jci.compilers.AbstractJavaCompiler,
JavaCompiler | public interface JavaCompiler (Code) | | The general compiler interface. All compilers implementing
this interface should read the resources from the reader
and store the java class files into the ResourceStore.
The actual compilation language does not matter. But the
contract is that the result of the compilation will be a
class file.
If possible the compiler should notify the optional
CompilationProblemHandler as soon as a problem is found.
author: tcurdt |
compile | CompilationResult compile(String[] pResourcePaths, ResourceReader pReader, ResourceStore pStore, ClassLoader pClassLoader, JavaCompilerSettings pSettings)(Code) | | Compiles the java resources "some/path/to/MyJava.java"
read through the ResourceReader and then stores the resulting
classes in the ResourceStore under "some/path/to/MyJava.class".
Note: As these are resource path you always have to use "/"
The result of the compilation run including detailed error
information is returned as CompilationResult. If you need to
get notified already during the compilation process you can
register a CompilationProblemHandler.
Note: Not all compilers might support this notification mechanism.
Parameters: pResourcePaths - Parameters: pReader - Parameters: pStore - Parameters: pClassLoader - Parameters: pSettings - always a CompilationResult |
setCompilationProblemHandler | void setCompilationProblemHandler(CompilationProblemHandler pHandler)(Code) | | Set the the handler that gets the notification of an error
or warning as soon as this information is available from
the compiler.
Note: Some compilers might not support this feature.
Parameters: pHandler - |
|
|