com.hammurapi.util
Interface Adaptable


public interface Adaptable

Classes which have multiple dynamic facets (adapters) shall implement this interface. This interface similar to Context.lookup() service loading.

Author:
Pavel Vlasov

Method Summary
<T> T
getAdapter(Class<T> type, Context context)
          Retrieves adapter of given type from adaptable.
 

Method Detail

getAdapter

<T> T getAdapter(Class<T> type,
                 Context context)
Retrieves adapter of given type from adaptable.

Type Parameters:
T - Adapter type.
Parameters:
type - Adapter type.
context - Adapter context.
Returns:
Adapter or null if adapter type is not supported.