net.sf.andromedaioc.bean.param.FieldAccessorWrapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of andromeda-ioc Show documentation
Show all versions of andromeda-ioc Show documentation
Inversion of Control Framework for Android
The newest version!
package net.sf.andromedaioc.bean.param;
import java.lang.reflect.Field;
/**
* Wrap field access
*
* @author Alexey Mitrov
*/
public class FieldAccessorWrapper implements AccessorWrapper {
private final Field field;
/**
* Create new field accessor for provided field
*
* @param field
*/
public FieldAccessorWrapper(Field field) {
this.field = field;
}
public void set(Object target, Object value) throws Exception {
field.setAccessible(true);
field.set(target, value);
}
}