public class GroovyCompiler extends Object implements Compiler
| Modifier and Type | Field and Description |
|---|---|
private static Set<String> |
EXT
.
|
(package private) static Logger |
log
.
|
private GroovyClassFactory<Object> |
objectGroovyClassFactory
.
|
| Constructor and Description |
|---|
GroovyCompiler(PluginContext context) |
| Modifier and Type | Method and Description |
|---|---|
CommandResolution |
compileCommand(String name,
byte[] source)
Compile a command..
|
String |
doCallBack(ShellSession session,
String name,
String defaultValue) |
private String |
eval(ShellSession session,
String name,
String def) |
Set<String> |
getExtensions()
Returns the set of extensions managed by this implementation.
|
static groovy.lang.GroovyShell |
getGroovyShell(ShellSession session)
The underlying groovu shell used for the REPL.
|
private <C extends BaseCommand> |
make(Class<C> clazz) |
private <C extends GroovyScriptCommand> |
make2(Class<C> clazz) |
private GroovyClassFactory<Object> objectGroovyClassFactory
public GroovyCompiler(PluginContext context)
public Set<String> getExtensions()
CompilergetExtensions in interface Compilerpublic String doCallBack(ShellSession session, String name, String defaultValue)
doCallBack in interface Compilerpublic static groovy.lang.GroovyShell getGroovyShell(ShellSession session)
private String eval(ShellSession session, String name, String def)
public CommandResolution compileCommand(String name, byte[] source) throws CommandException, NullPointerException
CompilercompileCommand in interface Compilername - the command namesource - the command source @return the command or null if no command can be resolvedCommandException - when the command exists but cannot be createdNullPointerException - if the command name is nullprivate <C extends BaseCommand> ClassShellCommand<C> make(Class<C> clazz) throws IntrospectionException
IntrospectionExceptionprivate <C extends GroovyScriptCommand> GroovyScriptShellCommand<C> make2(Class<C> clazz) throws IntrospectionException
IntrospectionExceptionCopyright © 2015 eXo Platform SAS. All Rights Reserved.