common_helper/src/main/java/com/xiongyingqi/util/AnnotationHelper.java
public static <T extends Annotation> Collection<Field> getFieldsWithAnnotationInClass(Class<?> inClazz, Class<T> annotationClass) {
        Collection<Field> fieldCollection = null;

        Field[] fields = inClazz.getDeclaredFields();
        for (Field field : fields) {
            if(Modifier.isStatic(field.getModifiers()) || Modifier.isFinal(field.getModifiers())){
                continue;
            }
            T t = readAnnotationValueOnField(field, annotationClass);
            if (t == null) {
                continue;
            }

            if (fieldCollection == null) {
                fieldCollection = new ArrayList<Field>();
            }

            fieldCollection.add(field);
        }

        return fieldCollection;
    }
public static <T extends Annotation> Collection<Field> getFieldsWithAnnotationInClass(Class<?> inClazz, Class<T> annotationClass) {
        Collection<Field> fieldCollection = null;

        Field[] fields = inClazz.getDeclaredFields();
        for (Field field : fields) {
            if(Modifier.isStatic(field.getModifiers()) || Modifier.isFinal(field.getModifiers())){
                continue;
            }
            T t = readAnnotationValueOnField(field, annotationClass);
            if (t == null) {
                continue;
            }

            if (fieldCollection == null) {
                fieldCollection = new ArrayList<Field>();
            }

            fieldCollection.add(field);
        }

        return fieldCollection;
    }
public static < T extends Annotation > Collection < Field > getFieldsWithAnnotationInClass ( Class < ? > inClazz , Class < T > annotationClass ) { Collection < Field > fieldCollection = null ; Field [ ] fields = inClazz . getDeclaredFields ( ) ; for ( Field field : fields ) { if ( Modifier . isStatic ( field . getModifiers ( ) ) || Modifier . isFinal ( field . getModifiers ( ) ) ) { continue ; } T t = readAnnotationValueOnField ( field , annotationClass ) ; if ( t == null ) { continue ; } if ( fieldCollection == null ) { fieldCollection = new ArrayList < Field > ( ) ; } fieldCollection . add ( field ) ; } return fieldCollection ; }
在类内搜索使用annotationClass注解的字段（包括在get、set方法上注解）
@param inClazz
@param annotationClass
@param <T>
@return
在类内搜索使用annotationClass注解的字段（包括在get、set方法上注解）