common_helper/src/main/java/com/xiongyingqi/util/EntityHelper.java
public static String[] getClassFields(Class<?> clazz) {
        Field[] fields = clazz.getDeclaredFields();
        int length = fields.length;
        String[] fieldNames = new String[length];
        for (int i = 0; i < length; i++) {
            Field field = fields[i];
            fieldNames[i] = field.getName();
        }
        return fieldNames;
    }
public static String[] getClassFields(Class<?> clazz) {
        Field[] fields = clazz.getDeclaredFields();
        int length = fields.length;
        String[] fieldNames = new String[length];
        for (int i = 0; i < length; i++) {
            Field field = fields[i];
            fieldNames[i] = field.getName();
        }
        return fieldNames;
    }
public static String [ ] getClassFields ( Class < ? > clazz ) { Field [ ] fields = clazz . getDeclaredFields ( ) ; int length = fields . length ; String [ ] fieldNames = new String [ length ] ; for ( int i = 0 ; i < length ; i ++ ) { Field field = fields [ i ] ; fieldNames [ i ] = field . getName ( ) ; } return fieldNames ; }
获取Class类的所有字段名 <br>
2013-10-21 下午5:19:48

@param clazz
@return
获取Class类的所有字段名 <br > 2013 - 10 - 21 下午5 : 19 : 48