public class Groovy2Compiler extends java.lang.Object implements ScriptArchiveCompiler
ScriptArchiveCompiler
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
GROOVY2_COMPILER_ID |
static java.lang.String |
GROOVY2_COMPILER_PARAMS_CUSTOMIZERS |
Constructor and Description |
---|
Groovy2Compiler(java.util.Map<java.lang.String,java.lang.Object> compilerParams) |
Modifier and Type | Method and Description |
---|---|
java.util.Set<java.lang.Class<?>> |
compile(ScriptArchive archive,
JBossModuleClassLoader moduleClassLoader,
java.nio.file.Path compilationRootDir)
Compile the archive into a ScriptModule
|
boolean |
shouldCompile(ScriptArchive archive)
Whether or not this compiler should be used to compile the archive
|
public static final java.lang.String GROOVY2_COMPILER_ID
public static final java.lang.String GROOVY2_COMPILER_PARAMS_CUSTOMIZERS
public Groovy2Compiler(java.util.Map<java.lang.String,java.lang.Object> compilerParams)
public boolean shouldCompile(ScriptArchive archive)
ScriptArchiveCompiler
shouldCompile
in interface ScriptArchiveCompiler
public java.util.Set<java.lang.Class<?>> compile(ScriptArchive archive, JBossModuleClassLoader moduleClassLoader, java.nio.file.Path compilationRootDir) throws ScriptCompilationException, java.io.IOException
ScriptArchiveCompiler
compile
in interface ScriptArchiveCompiler
archive
- archive to generate class files formoduleClassLoader
- class loader which can be used to find all classes and resources for modules.
The resultant classes of the compile operation should be injected into the classloader
for which the given archive has a declared dependency oncompilationRootDir
- a directory in which to store compiled classes, if any.ScriptCompilationException
- if there was a compilation issue in the archive.java.io.IOException
- if there was a problem reading/writing the archive