org.crsh.lang.java
Class ShellCommandImpl<T extends BaseCommand>
java.lang.Object
org.crsh.shell.impl.command.spi.ShellCommand<Instance<T>>
org.crsh.lang.java.ShellCommandImpl<T>
public class ShellCommandImpl<T extends BaseCommand>
- extends ShellCommand<Instance<T>>
- Author:
- Julien Viet
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
clazz
private final Class<T extends BaseCommand> clazz
- .
descriptor
private final CommandDescriptor<Instance<T extends BaseCommand>> descriptor
- .
ShellCommandImpl
public ShellCommandImpl(Class<T> clazz)
getDescriptor
public CommandDescriptor<Instance<T>> getDescriptor()
- Description copied from class:
ShellCommand
- Returns the command descriptor.
- Specified by:
getDescriptor in class ShellCommand<Instance<T extends BaseCommand>>
- Returns:
- the descriptor
getCompleter
protected Completer getCompleter(RuntimeContext context)
throws CommandCreationException
- Description copied from class:
ShellCommand
- Returns a completer for this command.
- Specified by:
getCompleter in class ShellCommand<Instance<T extends BaseCommand>>
- Parameters:
context - the related runtime context
- Returns:
- the completer
- Throws:
CommandCreationException - anything that would prevent completion to happen
resolveCommand
protected Command<?,?> resolveCommand(InvocationMatch<Instance<T>> match)
- Description copied from class:
ShellCommand
- Resolve the real command for a specified invocation match.
- Specified by:
resolveCommand in class ShellCommand<Instance<T extends BaseCommand>>
- Parameters:
match - the match
- Returns:
- the command
createCommand
T createCommand()
throws CommandCreationException
- Throws:
CommandCreationException
getPipeInvoker
private <C,P,PC extends Pipe<C,P>> Command<C,P> getPipeInvoker(CommandInvoker<Instance<T>,PC> invoker)
getProducerInvoker
private <P> Command<Void,P> getProducerInvoker(CommandInvoker<Instance<T>,?> invoker,
Class<P> producedType)
Copyright © 2014 eXo Platform SAS. All Rights Reserved.