Here you can find the source of setFieldValue(Field field, Object object, Object value)
public static void setFieldValue(Field field, Object object, Object value)
//package com.java2s; //License from project: Open Source License import java.lang.reflect.Field; public class Main { public static void setFieldValue(Field field, Object object, Object value) { try {/*from w w w .j a v a 2 s.c o m*/ field.set(object, value); } catch (IllegalAccessException e) { } } }