org.crsh.command
Class BaseCommand<C,P>
java.lang.Object
groovy.lang.GroovyObjectSupport
org.crsh.command.BaseCommand<C,P>
- All Implemented Interfaces:
- groovy.lang.GroovyObject, ShellCommand<C,P>
- Direct Known Subclasses:
- ClassCommand
public abstract class BaseCommand<C,P>
- extends groovy.lang.GroovyObjectSupport
- implements ShellCommand<C,P>
- Version:
- $Revision$
- Author:
- Julien Viet
| 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 |
BaseCommand
protected BaseCommand()
getProducedType
public java.lang.Class<P> getProducedType()
- Specified by:
getProducedType in interface ShellCommand<C,P>
getConsumedType
public java.lang.Class<C> getConsumedType()
- Specified by:
getConsumedType in interface ShellCommand<C,P>
invokeMethod
public final java.lang.Object invokeMethod(java.lang.String name,
java.lang.Object args)
- Specified by:
invokeMethod in interface groovy.lang.GroovyObject- Overrides:
invokeMethod in class groovy.lang.GroovyObjectSupport
getProperty
public final java.lang.Object getProperty(java.lang.String property)
- Specified by:
getProperty in interface groovy.lang.GroovyObject- Overrides:
getProperty in class groovy.lang.GroovyObjectSupport
setProperty
public final void setProperty(java.lang.String property,
java.lang.Object newValue)
- Specified by:
setProperty in interface groovy.lang.GroovyObject- Overrides:
setProperty in class groovy.lang.GroovyObjectSupport
getUnquoteArguments
protected boolean getUnquoteArguments()
- Returns true if the command wants its arguments to be unquoted.
- Returns:
- true if arguments must be unquoted
setUnquoteArguments
public void setUnquoteArguments(boolean unquoteArguments)
readLine
protected final java.lang.String readLine(java.lang.String msg)
readLine
protected final java.lang.String readLine(java.lang.String msg,
boolean echo)
execute
public final void execute(CommandContext<C,P> context,
java.lang.String... args)
throws ScriptException
- Specified by:
execute in interface ShellCommand<C,P>
- Throws:
ScriptException
execute
protected abstract void execute(CommandContext<C,P> context)
throws ScriptException
- Throws:
ScriptException
Copyright © 2010 eXo Platform SAS. All Rights Reserved.