|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.fhg.igd.semoa.util.Lookup
This convenience class performs additional checks on frequently required lookup tasks.
Constructor Summary | |
private |
Lookup()
Disabled construction. |
Method Summary | |
static Object |
environment(String key,
Class clazz)
Perform Environment.lookup(String) with the given key as
parameter. |
static Object |
environmentWhatIs(String whatisKey,
Class clazz)
Subsequently call whatIs(String) and
environment(String,Class) . |
static String |
whatIs(String key)
Call WhatIs.stringValue(String) , raise an
IllegalArgumentException in case the given key is not
defined and the return value would be null . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
private Lookup()
Method Detail |
public static String whatIs(String key)
WhatIs.stringValue(String)
, raise an
IllegalArgumentException
in case the given key is not
defined and the return value would be null
.
key
- The WhatIs
key
WhatIs
value
IllegalArgumentException
- if the given key is not definedpublic static Object environment(String key, Class clazz)
Environment.lookup(String)
with the given key as
parameter. The type of the result must be an instance of the given class,
or null
will be returned otherwise.
key
- The lookup keyclazz
- The expected type of the lookup result
Class
, null
otherwisepublic static Object environmentWhatIs(String whatisKey, Class clazz)
whatIs(String)
and
environment(String,Class)
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |