public final class CompilerUtil extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
compile(DiagnosticCollector<JavaFileObject> diagnostics,
JavaCompiler.CompilationTask task) |
static Class<?> |
compileAndLoad(String className,
DiagnosticCollector<JavaFileObject> diagnostics,
JavaFileManager fileManager,
JavaCompiler.CompilationTask task) |
static Class<?> |
compileInMemory(String className,
Map<String,CharSequence> sources)
|
static Class<?> |
compileOnDisk(String className,
Map<String,CharSequence> sources)
|
static Collection<File> |
persist(Map<String,CharSequence> sources) |
public static Class<?> compileInMemory(String className, Map<String,CharSequence> sources) throws ClassNotFoundException
className
- to return after compilation.sources
- to be compiled.ClassNotFoundException
- of the named class cannot be found.public static Class<?> compileOnDisk(String className, Map<String,CharSequence> sources) throws ClassNotFoundException, IOException
className
- to return after compilation.sources
- to be compiled.ClassNotFoundException
- of the named class cannot be found.IOException
- if an error occurs when writing to disk.public static Class<?> compileAndLoad(String className, DiagnosticCollector<JavaFileObject> diagnostics, JavaFileManager fileManager, JavaCompiler.CompilationTask task) throws ClassNotFoundException
ClassNotFoundException
public static boolean compile(DiagnosticCollector<JavaFileObject> diagnostics, JavaCompiler.CompilationTask task)
public static Collection<File> persist(Map<String,CharSequence> sources) throws IOException
IOException
Copyright © 2014-2020 Real Logic Limited. All Rights Reserved.