public class InjectHelper extends Object
Constructor and Description |
---|
InjectHelper() |
Modifier and Type | Method and Description |
---|---|
static Object |
getField(Object target,
Field field) |
static void |
injectFields(Object target,
Collection<Field> fields,
Map<String,Object> context,
List<Object> specialInstances) |
static void |
setField(Object target,
Field field,
Object value)
Set a field value
|
public static void injectFields(Object target, Collection<Field> fields, Map<String,Object> context, List<Object> specialInstances)
public static void setField(Object target, Field field, Object value) throws IllegalArgumentException, IllegalAccessException
The method will try to set the field using a setter first.
target
- the target objectfield
- the field to setvalue
- the value to setIllegalArgumentException
IllegalAccessException
public static Object getField(Object target, Field field) throws IllegalArgumentException, IllegalAccessException
Copyright © 2016 Eclipse NeoSCADA Project. All rights reserved.