package com.duben.library.utils.json;


import com.google.gson.ExclusionStrategy;
import com.google.gson.FieldAttributes;

/**
 * 描述：FooAnnotationExclusionStrategy
 * 作者：孟崔广
 * 时间：2018/1/10 17:51
 * 邮箱：mengcuiguang@cashbang.cn
 */
public class FooAnnotationExclusionStrategy implements ExclusionStrategy {
    @Override
    public boolean shouldSkipField(FieldAttributes f) {
        return f.getAnnotation(FooAnnotation.class) != null;
    }

    @Override
    public boolean shouldSkipClass(Class<?> clazz) {
        return false;
//        return clazz.getAnnotation(FooAnnotation.class) != null;
    }
}
