接口 JavaCompiler
public interface JavaCompiler
Description:
Title:首亨软件 - CRM、TSS、ERP等信息化管理软件
-
方法概要
修饰符和类型方法说明compile(String[] pResourcePaths, ResourceReader pReader, ResourceStore pStore) uses the default compiler settings and the current classloadercompile(String[] pResourcePaths, ResourceReader pReader, ResourceStore pStore, ClassLoader pClassLoader) uses the default compiler settingscompile(String[] pResourcePaths, ResourceReader pReader, ResourceStore pStore, ClassLoader pClassLoader, JavaCompilerSettings pSettings) 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".factory method to create the underlying default settingsvoidSet the the handler that gets the notification of an error or warning as soon as this information is available from the compiler.
-
方法详细资料
-
setCompilationProblemHandler
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.- 参数:
pHandler- CompilationProblemHandler
-
createDefaultSettings
JavaCompilerSettings createDefaultSettings()factory method to create the underlying default settings- 返回:
- JavaCompilerSettings
-
compile
uses the default compiler settings and the current classloader- 参数:
pResourcePaths- String[]pReader- ResourceReaderpStore- ResourceStore- 返回:
- CompilationResult
-
compile
CompilationResult compile(String[] pResourcePaths, ResourceReader pReader, ResourceStore pStore, ClassLoader pClassLoader) uses the default compiler settings- 参数:
pResourcePaths- String[]pReader- ResourceReaderpStore- ResourceStorepClassLoader- ClassLoader- 返回:
- CompilationResult
-
compile
CompilationResult compile(String[] pResourcePaths, ResourceReader pReader, ResourceStore pStore, ClassLoader pClassLoader, JavaCompilerSettings pSettings) 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.- 参数:
pResourcePaths- String[]pReader- ResourceReaderpStore- ResourceStorepClassLoader- ClassLoaderpSettings- JavaCompilerSettings- 返回:
- always a CompilationResult
-