MetaFieldUtil { public static String toMetaFieldInfoString(Object obj) { StringBuffer buf = new StringBuffer(100); MetaFieldInfo[] fields = toMetaFieldInfoArray(obj, null, true); for (int i = 0; i < fields.length; i++) { MetaFieldInfo field = fields[i]; buf.append(field.name); buf.append("="); if (field.actualValue != null && field.actualValue.getClass().equals(String.class)) { buf.append('"'); buf.append(field.value); buf.append('"'); } else { buf.append(field.value); } if (i+1 < fields.length) buf.append(","); } return buf.toString(); }  static String toMetaFieldInfoString(Object obj); static MetaFieldInfo[] toMetaFieldInfoArray(Object obj); static MetaFieldInfo[] toMetaFieldInfoArray(Object obj, String stringForNullValues); static MetaFieldInfo[] toMetaFieldInfoArray(Object obj, String stringForNullValues, boolean ignoreAnnotatedName); static MetaFieldInfo[] toMetaFieldInfoArray(Class type, Object obj, String stringForNullValues, boolean ignoreAnnotatedName, boolean recursive);  }
@Test public void toMetaFieldInfoString() throws Exception { Employee emp = new Employee(); String string0 = MetaFieldUtil.toMetaFieldInfoString(emp); logger.debug(string0); emp = new Administrator(); String string1 = MetaFieldUtil.toMetaFieldInfoString(emp); logger.debug(string1); }