|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.crsh.lang.impl.groovy.GroovyCompiler
public class GroovyCompiler
Field Summary | |
---|---|
private static Set<String> |
EXT
. |
(package private) static Logger |
log
. |
private GroovyClassFactory<Object> |
objectGroovyClassFactory
. |
Constructor Summary | |
---|---|
GroovyCompiler(PluginContext context)
|
Method Summary | ||
---|---|---|
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
|
make(Class<C> clazz)
|
|
private
|
make2(Class<C> clazz)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final Logger log
private static final Set<String> EXT
private GroovyClassFactory<Object> objectGroovyClassFactory
Constructor Detail |
---|
public GroovyCompiler(PluginContext context)
Method Detail |
---|
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 resolved
CommandException
- when the command exists but cannot be created
NullPointerException
- 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |