org.crsh.cli.impl.lang
Interface Instance<T>

All Known Implementing Classes:
BaseCommandMatch.BaseInvoker

public interface Instance<T>

Author:
Julien Viet

Method Summary
 T get()
          Return the instance, the same instance should be returned, however it can lazily be created.
<T> T
resolve(Class<T> type)
          Resolve the specified contextual type to an instance or return null if no object able to satisfy the class type was resolved.
 

Method Detail

resolve

<T> T resolve(Class<T> type)
Resolve the specified contextual type to an instance or return null if no object able to satisfy the class type was resolved.

Type Parameters:
T - the generic type parameter
Parameters:
type - the type to resolve
Returns:
the resolved instance

get

T get()
      throws Exception
Return the instance, the same instance should be returned, however it can lazily be created.

Returns:
the instance
Throws:
Exception - any exception preventing to obtain the instance


Copyright © 2015 eXo Platform SAS. All Rights Reserved.