Example usage for com.google.gson ExclusionStrategy interface-usage

List of usage examples for com.google.gson ExclusionStrategy interface-usage

Introduction

In this page you can find the example usage for com.google.gson ExclusionStrategy interface-usage.

Usage

From source file org.cellcore.code.shared.GsonAnnotationExclusionStrategy.java

/**
 *
 * Copyright 2013 Freddy Munoz (freddy@cellcore.org)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.

From source file org.eclipse.epp.internal.logging.aeri.ui.utils.EmfFieldExclusionStrategy.java

public class EmfFieldExclusionStrategy implements ExclusionStrategy {
    @Override
    public boolean shouldSkipField(FieldAttributes f) {
        String name = f.getName();
        if (name.length() > 1 && name.charAt(0) == 'e' && Character.isUpperCase(name.charAt(1))) {
            return true;

From source file org.eclipse.recommenders.utils.gson.EmfFieldExclusionStrategy.java

public class EmfFieldExclusionStrategy implements ExclusionStrategy {
    @Override
    public boolean shouldSkipField(FieldAttributes f) {
        String name = f.getName();
        if (name.length() > 1 && name.charAt(0) == 'e' && Character.isUpperCase(name.charAt(1))) {
            return true;

From source file org.fao.geonet.api.FieldNameExclusionStrategy.java

/**
 * Created by juanl on 06/09/2016.
 */
public class FieldNameExclusionStrategy implements ExclusionStrategy {
    private List<String> excludedFields;

From source file org.mifosplatform.infrastructure.core.api.ParameterListExclusionStrategy.java

public class ParameterListExclusionStrategy implements ExclusionStrategy {

    private final Set<String> parameterNamesToSkip;

    public ParameterListExclusionStrategy(final Set<String> parameterNamesToSkip) {
        this.parameterNamesToSkip = parameterNamesToSkip;

From source file org.mifosplatform.infrastructure.core.api.ParameterListInclusionStrategy.java

public class ParameterListInclusionStrategy implements ExclusionStrategy {

    private final Set<String> parameterNamesToInclude;

    public ParameterListInclusionStrategy(final Set<String> parameterNamesToSkip) {
        this.parameterNamesToInclude = parameterNamesToSkip;

From source file org.pascani.dsl.dbmapper.typeadapters.TransientExclusionStrategy.java

/**
 * Custom Gson exclusion strategy for fields annotated with {@link Transient}
 * 
 * @author Miguel Jimnez - Initial contribution and API
 */
public class TransientExclusionStrategy implements ExclusionStrategy {

From source file org.smartparam.serializer.metadata.PropertyExclusionStrategy.java

/**
 *
 * @author Adam Dubiel
 */
public class PropertyExclusionStrategy implements ExclusionStrategy {

From source file org.terasology.persistence.typeHandling.gson.GsonMapExclusionStrategy.java

public class GsonMapExclusionStrategy implements ExclusionStrategy {
    @Override
    public boolean shouldSkipField(FieldAttributes f) {
        Type fieldType = f.getDeclaredType();
        Class<?> fieldClass = ReflectionUtil.getClassOfType(fieldType);

From source file org.wso2.carbon.apimgt.impl.soaptorest.util.SwaggerFieldsExcludeStrategy.java

public class SwaggerFieldsExcludeStrategy implements ExclusionStrategy {
    @Override
    public boolean shouldSkipField(FieldAttributes fieldAttributes) {
        return fieldAttributes.getName().equals("vendorExtensions");
    }