org.crsh.lang.java
Class CommandImpl.BaseInvoker
java.lang.Object
org.crsh.shell.impl.command.spi.CommandInvoker<C,P>
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
|
|
Method Summary |
T |
get()
Return the instance, the same instance should be returned, however it can lazily be created. |
|
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
command
final T extends BaseCommand command
CommandImpl.BaseInvoker
protected CommandImpl.BaseInvoker(T command)
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.