All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.andromedaioc.bean.param.FieldAccessorWrapper Maven / Gradle / Ivy

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);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy