src/main/java/org/jboss/util/naming/Util.java
public static Object lookup(Context context, Name name, Class clazz) throws Exception
   {
      Object result = context.lookup(name);
      checkObject(context, name.toString(), result, clazz);
      return result;
   }
public static Object lookup(Context context, Name name, Class clazz) throws Exception
   {
      Object result = context.lookup(name);
      checkObject(context, name.toString(), result, clazz);
      return result;
   }
public static Object lookup ( Context context , Name name , Class clazz ) throws Exception { Object result = context . lookup ( name ) ; checkObject ( context , name . toString ( ) , result , clazz ) ; return result ; }
Lookup an object in the given context

@param context the context
@param name the name to lookup
@param clazz the expected type
@return the object
@throws Exception for any error
Lookup an object in the given context