org.crsh.groovy
Class GroovyCommand

java.lang.Object
  extended by org.crsh.command.AbstractCommand
      extended by org.crsh.command.BaseCommand
          extended by org.crsh.groovy.GroovyCommand
All Implemented Interfaces:
groovy.lang.GroovyObject
Direct Known Subclasses:
CRaSHCommand

public abstract class GroovyCommand
extends BaseCommand
implements groovy.lang.GroovyObject

The base command for Groovy class based commands.


Field Summary
private  groovy.lang.MetaClass metaClass
           
 
Fields inherited from class org.crsh.command.BaseCommand
log, unmatched
 
Fields inherited from class org.crsh.command.AbstractCommand
context, out
 
Constructor Summary
protected GroovyCommand()
           
 
Method Summary
 groovy.lang.MetaClass getMetaClass()
           
 Object getProperty(String property)
           
 Object invokeMethod(String name, Object args)
           
 void setMetaClass(groovy.lang.MetaClass metaClass)
           
 void setProperty(String property, Object newValue)
           
static Exception unwrap(Exception cause)
           
static ScriptException unwrap(groovy.util.ScriptException cause)
           
 
Methods inherited from class org.crsh.command.BaseCommand
execute, getUnmatched, readLine, readLine
 
Methods inherited from class org.crsh.command.AbstractCommand
peekContext, popContext, pushContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

metaClass

private transient groovy.lang.MetaClass metaClass
Constructor Detail

GroovyCommand

protected GroovyCommand()
Method Detail

unwrap

public static ScriptException unwrap(groovy.util.ScriptException cause)

unwrap

public static Exception unwrap(Exception cause)

invokeMethod

public final Object invokeMethod(String name,
                                 Object args)
Specified by:
invokeMethod in interface groovy.lang.GroovyObject

getProperty

public final Object getProperty(String property)
Specified by:
getProperty in interface groovy.lang.GroovyObject

setProperty

public final void setProperty(String property,
                              Object newValue)
Specified by:
setProperty in interface groovy.lang.GroovyObject

getMetaClass

public groovy.lang.MetaClass getMetaClass()
Specified by:
getMetaClass in interface groovy.lang.GroovyObject

setMetaClass

public void setMetaClass(groovy.lang.MetaClass metaClass)
Specified by:
setMetaClass in interface groovy.lang.GroovyObject


Copyright © 2015 eXo Platform SAS. All Rights Reserved.