public interface Context
| Modifier and Type | Method and Description |
|---|---|
Object |
get(Class<?> clazz)
Retrieves an object by its unique key
|
Object |
get(String name)
Retrieves an object by its unique key
|
<T> T |
getAs(Class<T> clazz)
Retrieves an object as an instance of the specified class type.
|
<T> T |
getAs(String name,
Class<T> clazz)
Retrieves an object as an instance of the specified class type.
|
void |
put(Class<?> clazz,
Object value)
Put some object in the context.
|
void |
put(String name,
Object value)
Put some object in the context.
|
void put(Class<?> clazz, Object value)
clazz - The unique key (id) of the objectvalue - The object itselfvoid put(String name, Object value)
name - The unique key (id) of the objectvalue - The object itselfObject get(Class<?> clazz)
clazz - The unique key (id) of the objectObject get(String name)
name - The unique key (id) of the object<T> T getAs(Class<T> clazz)
clazz - Copyright © 2016 Omnia Consulting. All rights reserved.