org.crsh.shell.impl
Class GroovyScriptCommand

java.lang.Object
  extended by groovy.lang.GroovyObjectSupport
      extended by groovy.lang.Script
          extended by org.crsh.shell.impl.GroovyScriptCommand
All Implemented Interfaces:
groovy.lang.GroovyObject, ShellCommand<Void,Void>

public abstract class GroovyScriptCommand
extends groovy.lang.Script
implements ShellCommand<Void,Void>

This class provides the base class for Groovy scripts. It should not be used directly as it is rather used for configuring a Groovy CompilerConfiguration.setScriptBaseClass(String) class.

Version:
$Revision$
Author:
Julien Viet

Constructor Summary
GroovyScriptCommand()
           
 
Method Summary
 void execute(CommandContext<Void,Void> context, String... args)
           
 Class<Void> getConsumedType()
           
 Class<Void> getProducedType()
           
 Object getProperty(String property)
           
 
Methods inherited from class groovy.lang.Script
evaluate, evaluate, getBinding, invokeMethod, print, println, println, run, run, setBinding, setProperty
 
Methods inherited from class groovy.lang.GroovyObjectSupport
getMetaClass, setMetaClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroovyScriptCommand

public GroovyScriptCommand()
Method Detail

getProducedType

public Class<Void> getProducedType()
Specified by:
getProducedType in interface ShellCommand<Void,Void>

getConsumedType

public Class<Void> getConsumedType()
Specified by:
getConsumedType in interface ShellCommand<Void,Void>

getProperty

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

execute

public void execute(CommandContext<Void,Void> context,
                    String... args)
             throws ScriptException
Specified by:
execute in interface ShellCommand<Void,Void>
Throws:
ScriptException


Copyright © 2010 eXo Platform SAS. All Rights Reserved.