|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crsh.lang.groovy.GroovyCommandManagerImpl
public class GroovyCommandManagerImpl
| Field Summary | |
|---|---|
(package private) static Logger |
log
. |
private GroovyClassFactory<Object> |
objectGroovyClassFactory
. |
private ClassCache<GroovyScript> |
scriptCache
. |
| Constructor Summary | |
|---|---|
GroovyCommandManagerImpl(PluginContext context)
|
|
| Method Summary | ||
|---|---|---|
void |
destroy(HashMap<String,Object> session)
|
|
String |
doCallBack(HashMap<String,Object> session,
String name,
String defaultValue)
|
|
private String |
eval(HashMap<String,Object> session,
String name,
String def)
|
|
Set<String> |
getExtensions()
Returns the set of extensions managed by this implementation. |
|
static groovy.lang.GroovyShell |
getGroovyShell(CRaSHSession session)
The underlying groovu shell used for the REPL. |
|
GroovyScript |
getLifeCycle(HashMap<String,Object> session,
String name)
|
|
void |
init(HashMap<String,Object> session)
|
|
boolean |
isActive()
Return true if this command manager is active. |
|
private
|
make(Class<C> clazz)
|
|
private
|
make2(Class<C> clazz)
|
|
CommandResolution |
resolveCommand(String name,
byte[] source)
Resolve a command for the specified command name. |
|
| 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 ClassCache<GroovyScript> scriptCache
private GroovyClassFactory<Object> objectGroovyClassFactory
| Constructor Detail |
|---|
public GroovyCommandManagerImpl(PluginContext context)
| Method Detail |
|---|
public Set<String> getExtensions()
CommandManager
getExtensions in interface CommandManagerpublic boolean isActive()
CommandManager
isActive in interface CommandManager
public String doCallBack(HashMap<String,Object> session,
String name,
String defaultValue)
doCallBack in interface CommandManagerpublic void init(HashMap<String,Object> session)
init in interface CommandManagerpublic void destroy(HashMap<String,Object> session)
destroy in interface CommandManagerpublic static groovy.lang.GroovyShell getGroovyShell(CRaSHSession session)
private String eval(HashMap<String,Object> session,
String name,
String def)
public GroovyScript getLifeCycle(HashMap<String,Object> session,
String name)
throws CommandCreationException,
NullPointerException
CommandCreationException
NullPointerException
public CommandResolution resolveCommand(String name,
byte[] source)
throws CommandCreationException,
NullPointerException
CommandManager
resolveCommand in interface CommandManagername - the command namesource - the command source @return the command or null if no command can be resolved
CommandCreationException - when the command exists but cannot be created
NullPointerException - if the command name is nullprivate <C extends BaseCommand> ShellCommandImpl<C> make(Class<C> clazz)
private <C extends GroovyScriptCommand> GroovyScriptShellCommand<C> make2(Class<C> clazz)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||