org.crsh.lang.impl.groovy.command
Class GroovyScriptShellCommand<T extends GroovyScriptCommand>

java.lang.Object
  extended by org.crsh.shell.impl.command.spi.Command<org.crsh.cli.impl.lang.Instance<T>>
      extended by org.crsh.lang.impl.groovy.command.GroovyScriptShellCommand<T>

public class GroovyScriptShellCommand<T extends GroovyScriptCommand>
extends Command<org.crsh.cli.impl.lang.Instance<T>>

Author:
Julien Viet

Constructor Summary
GroovyScriptShellCommand(Class<T> clazz)
           
 
Method Summary
protected  Completer getCompleter(RuntimeContext context)
          Returns a completer for this command.
 CommandDescriptor<org.crsh.cli.impl.lang.Instance<T>> getDescriptor()
          Returns the command descriptor.
protected  CommandMatch<?,?> resolve(org.crsh.cli.impl.invocation.InvocationMatch<org.crsh.cli.impl.lang.Instance<T>> match)
          Resolve the real match for a specified invocation match.
 
Methods inherited from class org.crsh.shell.impl.command.spi.Command
complete, describe, describe, resolveCommand, resolveCommand, resolveInvoker
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroovyScriptShellCommand

public GroovyScriptShellCommand(Class<T> clazz)
                         throws org.crsh.cli.impl.descriptor.IntrospectionException
Throws:
org.crsh.cli.impl.descriptor.IntrospectionException
Method Detail

getDescriptor

public CommandDescriptor<org.crsh.cli.impl.lang.Instance<T>> getDescriptor()
Description copied from class: Command
Returns the command descriptor.

Specified by:
getDescriptor in class Command<org.crsh.cli.impl.lang.Instance<T extends GroovyScriptCommand>>
Returns:
the descriptor

resolve

protected CommandMatch<?,?> resolve(org.crsh.cli.impl.invocation.InvocationMatch<org.crsh.cli.impl.lang.Instance<T>> match)
Description copied from class: Command
Resolve the real match for a specified invocation match.

Specified by:
resolve in class Command<org.crsh.cli.impl.lang.Instance<T extends GroovyScriptCommand>>
Parameters:
match - the match
Returns:
the command

getCompleter

protected Completer getCompleter(RuntimeContext context)
                          throws CommandException
Description copied from class: Command
Returns a completer for this command.

Specified by:
getCompleter in class Command<org.crsh.cli.impl.lang.Instance<T extends GroovyScriptCommand>>
Parameters:
context - the related runtime context
Returns:
the completer
Throws:
CommandException - anything that would prevent completion to happen


Copyright © 2015 eXo Platform SAS. All Rights Reserved.