common_helper/src/main/java/com/xiongyingqi/util/EntityHelper.java
public static Collection<String> getUnstaticClassFieldNameCollection(Class<?> clazz) {
        if (clazz == null) {
            throw new NullPointerException("传入的clazz为空对象！");
        }
        Field[] fields = clazz.getDeclaredFields();
        int length = fields.length;
        Collection<String> fieldNames = new ArrayList<String>();
        for (int i = 0; i < length; i++) {
            Field field = fields[i];
            if (!Modifier.isStatic(field.getModifiers())) {
                fieldNames.add(field.getName());
            }
        }
        return fieldNames;
    }
public static Collection<String> getUnstaticClassFieldNameCollection(Class<?> clazz) {
        if (clazz == null) {
            throw new NullPointerException("传入的clazz为空对象！");
        }
        Field[] fields = clazz.getDeclaredFields();
        int length = fields.length;
        Collection<String> fieldNames = new ArrayList<String>();
        for (int i = 0; i < length; i++) {
            Field field = fields[i];
            if (!Modifier.isStatic(field.getModifiers())) {
                fieldNames.add(field.getName());
            }
        }
        return fieldNames;
    }
public static Collection < String > getUnstaticClassFieldNameCollection ( Class < ? > clazz ) { if ( clazz == null ) { throw new NullPointerException ( "传入的clazz为空对象！"); } Field [ ] fields = clazz . getDeclaredFields ( ) ; int length = fields . length ; Collection < String > fieldNames = new ArrayList < String > ( ) ; for ( int i = 0 ; i < length ; i ++ ) { Field field = fields [ i ] ; if ( ! Modifier . isStatic ( field . getModifiers ( ) ) ) { fieldNames . add ( field . getName ( ) ) ; } } return fieldNames ; }
获取Class类的所有非静态字段名 <br>
2013-10-21 下午5:19:48

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