站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss RULES 4.0.0.11754MR2 API 英文版文档

JavaCompiler (Drools 4.0.0.11754MR2 API) - JBoss RULES 4.0.0.11754MR2 API 英文版文档


org.apache.commons.jci.compilers
Interface JavaCompiler

All Known Implementing Classes:
AbstractJavaCompiler, EclipseJavaCompiler, JaninoJavaCompiler

public interface JavaCompiler

Author:
tcurdt

Method Summary
 CompilationResult compile(String[] pResourcePaths, ResourceReader pReader, ResourceStore pStore)
          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".
 CompilationResult compile(String[] pResourcePaths, ResourceReader pReader, ResourceStore pStore, ClassLoader classLoader)
          As the usual compiler but you can provide the classloader and therefor the classpath you are compiling with.
 void setCompilationProblemHandler(CompilationProblemHandler pHandler)
          Set the the handler that gets the notification of an error or warning as soon as this information is available from the compiler.
 

Method Detail

setCompilationProblemHandler

void setCompilationProblemHandler(CompilationProblemHandler pHandler)
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 -

compile

CompilationResult compile(String[] pResourcePaths,
                          ResourceReader pReader,
                          ResourceStore pStore)
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 -
pReader -
pStore -
Returns:
always a CompilationResult

compile

CompilationResult compile(String[] pResourcePaths,
                          ResourceReader pReader,
                          ResourceStore pStore,
                          ClassLoader classLoader)
As the usual compiler but you can provide the classloader and therefor the classpath you are compiling with.



Copyright © 2001-2007 JBoss Inc.. All Rights Reserved.