public class DroneContext extends Object
| Constructor and Description |
|---|
DroneContext() |
| Modifier and Type | Method and Description |
|---|---|
<T> DroneContext |
add(Class<?> key,
Class<? extends Annotation> qualifier,
T instance)
Adds object under given key and given qualifier
|
<T> DroneContext |
add(Class<T> key,
T instance)
Adds object under given key and
Default qualifier |
<T> T |
get(Class<T> key)
Gets object stored under
Default qualifier and given key |
<T> T |
get(Class<T> key,
Class<? extends Annotation> qualifier)
Gets object stored under given qualifier and given key
|
DroneContext |
remove(Class<?> key)
Removes object under given key and
Default qualifier |
DroneContext |
remove(Class<?> key,
Class<? extends Annotation> qualifier)
Removes object under given key and given qualifier
|
public <T> T get(Class<T> key)
Default qualifier and given keyT - Type of the objectkey - Key used to find the objectpublic <T> T get(Class<T> key, Class<? extends Annotation> qualifier)
T - Type of the objectkey - Key used to find the objectqualifier - Qualifier used to find the objectpublic <T> DroneContext add(Class<T> key, T instance)
Default qualifierT - Type of the objectkey - Key used to store the objectinstance - Object to be storedpublic <T> DroneContext add(Class<?> key, Class<? extends Annotation> qualifier, T instance)
T - Type of the objectkey - Key used to store the objectqualifier - Qualifier used to store the objectinstance - Object to be storedpublic DroneContext remove(Class<?> key)
Default qualifierkey - Key used to find the objectpublic DroneContext remove(Class<?> key, Class<? extends Annotation> qualifier)
key - Key used to find the objectqualifier - Qualifier used to find the objectCopyright © 2012 JBoss by Red Hat. All Rights Reserved.