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()
Compiler
getExtensions
in interface Compiler
public String doCallBack(ShellSession session, String name, String defaultValue)
doCallBack
in interface Compiler
public 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
Compiler
compileCommand
in interface Compiler
name
- 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
IntrospectionException
private <C extends GroovyScriptCommand> GroovyScriptShellCommand<C> make2(Class<C> clazz) throws IntrospectionException
IntrospectionException
Copyright © 2015 eXo Platform SAS. All Rights Reserved.