All Downloads are FREE. Search and download functionalities are using the official Maven repository.

eu.fbk.utils.gson.AnnotationExclusionStrategy Maven / Gradle / Ivy

There is a newer version: 3.2
Show newest version
package eu.fbk.utils.gson;

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

/**
 * Created by alessio on 25/09/16.
 */

public class AnnotationExclusionStrategy implements ExclusionStrategy {

    @Override public boolean shouldSkipField(FieldAttributes fieldAttributes) {
        return fieldAttributes.getAnnotation(JSONExclude.class) != null;
    }

    @Override public boolean shouldSkipClass(Class aClass) {
        return false;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy