org.slim3.commons.util
Class ContextUtil
java.lang.Object
org.slim3.commons.util.ContextUtil
public final class ContextUtil
- extends Object
A utility class for Context
.
- Version:
- 3.0
- Author:
- higa
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 contextname
- 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.