org.crsh.lang.java
Class CommandImpl.BaseInvoker

java.lang.Object
  extended by org.crsh.shell.impl.command.spi.CommandInvoker<C,P>
      extended by org.crsh.lang.java.CommandImpl.BaseInvoker
All Implemented Interfaces:
Closeable, Flushable, Instance<T>, Consumer<C>, Filter<C,P,CommandContext<? super P>>, Producer<P,CommandContext<? super P>>
Enclosing class:
CommandImpl<T extends BaseCommand,C,P>

abstract class CommandImpl.BaseInvoker
extends CommandInvoker<C,P>
implements Instance<T>


Field Summary
(package private)  T command
           
 
Constructor Summary
protected CommandImpl.BaseInvoker(T command)
           
 
Method Summary
 T get()
          Return the instance, the same instance should be returned, however it can lazily be created.
<U> U
resolve(Class<U> type)
          Resolve the specified contextual type to an instance or return null if no object able to satisfy the class type was resolved.
 
Methods inherited from class org.crsh.shell.impl.command.spi.CommandInvoker
getKeyHandler, invoke
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.crsh.io.Consumer
getConsumedType, provide
 
Methods inherited from interface java.io.Flushable
flush
 
Methods inherited from interface org.crsh.io.Producer
close, getProducedType, open
 

Field Detail

command

final T extends BaseCommand command
Constructor Detail

CommandImpl.BaseInvoker

protected CommandImpl.BaseInvoker(T command)
Method Detail

resolve

public <U> U resolve(Class<U> type)
Description copied from interface: Instance
Resolve the specified contextual type to an instance or return null if no object able to satisfy the class type was resolved.

Specified by:
resolve in interface Instance<T extends BaseCommand>
Type Parameters:
U - the generic type parameter
Parameters:
type - the type to resolve
Returns:
the resolved instance

get

public T get()
                          throws Exception
Description copied from interface: Instance
Return the instance, the same instance should be returned, however it can lazily be created.

Specified by:
get in interface Instance<T extends BaseCommand>
Returns:
the instance
Throws:
Exception - any exception preventing to obtain the instance


Copyright © 2014 eXo Platform SAS. All Rights Reserved.