org.crsh.lang.impl.java
Class BaseCommandMatch.BaseInvoker

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

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


Field Summary
(package private)  T command
           
 
Constructor Summary
protected BaseCommandMatch.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
close, flush, getKeyHandler, getScreenContext, invoke, open, provide
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.crsh.stream.Consumer
getConsumedType
 
Methods inherited from interface org.crsh.stream.Producer
getProducedType
 

Field Detail

command

final T extends BaseCommand command
Constructor Detail

BaseCommandMatch.BaseInvoker

protected BaseCommandMatch.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 © 2015 eXo Platform SAS. All Rights Reserved.