import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.HashMap; import java.util.Iterator; import java.util.Map; public class CommonObjectUtils { public static Map convertObjectToMap(Object obj){ Map map = new HashMap(); Field[] fields = obj.getClass().getDeclaredFields(); for(int i=0; i