public final class DependencyInjector extends Object
| Modifier and Type | Field and Description |
|---|---|
private static String |
INJECTION_ERROR |
private static String |
VALUE |
| Modifier | Constructor and Description |
|---|---|
private |
DependencyInjector() |
| Modifier and Type | Method and Description |
|---|---|
static void |
inject(Object object,
Field field,
org.ow2.chameleon.testing.helpers.OSGiHelper helper)
Injects a value in the field 'field' from the object 'object'.
|
static void |
inject(Object object,
org.ow2.chameleon.testing.helpers.OSGiHelper helper)
Injects values in the annotated fields.
|
private static boolean |
isController(Class<?> type) |
private static String |
readFilterAnnotation(Field field) |
private static String |
readNameAnnotation(Field field) |
private static void |
set(Object object,
Field field,
Object value) |
private static List<String> |
traverseHierarchy(Class<?> type) |
private static Object |
waitForService(org.ow2.chameleon.testing.helpers.OSGiHelper helper,
Class<?> clazz,
String filter)
This method is used until the new OSGi helper are released.
|
private static final String INJECTION_ERROR
private static final String VALUE
public static void inject(Object object, org.ow2.chameleon.testing.helpers.OSGiHelper helper)
object - the test objecthelper - the OSGi Helper letting us accessing servicespublic static void inject(Object object, Field field, org.ow2.chameleon.testing.helpers.OSGiHelper helper)
object - the test objectfield - the field to inject.helper - the OSGi Helper letting us accessing servicesprivate static boolean isController(Class<?> type)
private static Object waitForService(org.ow2.chameleon.testing.helpers.OSGiHelper helper, Class<?> clazz, String filter)
helper - the helperclazz - the service interfacefilter - the filter (optional)Copyright © 2013–2015 Wisdom Framework. All rights reserved.