com.im.ijc.core/1 5.9.4

com.im.ijc.core.api.util
Class LookupProviders

java.lang.Object
  extended by com.im.ijc.core.api.util.LookupProviders

public final class LookupProviders
extends Object

Helper class for Lookup.Provider.


Method Summary
static
<T> T
lookup(Object obj, Class<T> clazz)
          If obj implements Lookup.Provider look up an instance of a given clazz from the lookup.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

lookup

public static <T> T lookup(Object obj,
                           Class<T> clazz)
If obj implements Lookup.Provider look up an instance of a given clazz from the lookup. Otherwise try to cast to the given clazz. If that fails return null.

Type Parameters:
T - service type
Parameters:
obj - object with service
clazz - service type
Returns:
instance of service or null

com.im.ijc.core/1 5.9.4