public void setFieldValue(Object instance, String fieldName, Object value) throws FieldIllegalAccessException {
// no need to call findField(),because we don't want field in super class
Field field = fields.get(fieldName);
if (field != null && field.isPrivate()) {
throw new FieldIllegalAccessException(getName() + "." + fieldName + " is private,can't access");
}
if (field != null && field.isFinal()) {
throw new FieldIllegalAccessException(getName() + "." + fieldName + " is final,can't access");
}
if (this.getSuperclass() != null)
getSuperclass().setFieldValue(instance, fieldName, value);
else