org.slim3.commons.util
Class ContextUtil

java.lang.Object
  extended by org.slim3.commons.util.ContextUtil

public final class ContextUtil
extends Object

A utility class for Context.

Version:
3.0
Author:
higa

Method Summary
static
<T> T
lookup(Context context, String name)
          Looks up a object by the name.
 
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(Context context,
                           String name)
                throws NameNotFoundRuntimeException,
                       NamingRuntimeException
Looks up a object by the name.

Type Parameters:
T - the target type
Parameters:
context - the naming context
name - the name
Returns:
a object
Throws:
NameNotFoundRuntimeException - if the name is not bound to any objects
NamingRuntimeException - if NamingException is encountered


Copyright © 2008-2009 The Slim3 project. All Rights Reserved.