public static Boolean checkObjectIsNotNull(Object m) throws IllegalArgumentException, IllegalAccessException{
Boolean result = false;
if(m != null){
Class clazz = m.getClass();
Field[] f = clazz.getDeclaredFields();
for (int i = 0; i < f.length; i++) {
if(f[i].get(m)!=null){
result = true;
}
}
}
return result;
}
基本的数据类型及String Date等不能用该方法