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

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

Introduction

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

Usage

From source file com.ibm.og.json.type.SelectionConfigTypeAdapterFactory.java

/**
 * A type adapter factory that abstracts over the notion of a selection from many choices
 * 
 * @see ChoiceConfigTypeAdapterFactory
 * @since 1.0
 */

From source file com.ibm.og.util.json.type.CaseInsensitiveEnumTypeAdapterFactory.java

/**
 * A type adapter factory that deserializes enums in a case insensitive way
 * 
 * @since 1.0
 */
public class CaseInsensitiveEnumTypeAdapterFactory implements TypeAdapterFactory {

From source file com.ibm.watson.developer_cloud.discovery.v1.model.collection.field.FieldAdapterFactory.java

/**
 * Override default enum handling for poorly formed JSON field types schema.
 */
public class FieldAdapterFactory implements TypeAdapterFactory {
    @SuppressWarnings("unchecked")
    @Override

From source file com.ibm.watson.developer_cloud.discovery.v1.model.common.EagerNumberAdapterFactory.java

/**
 * Override the default {@link LazilyParsedNumber} for parsing {@link Number}s.
 */
public class EagerNumberAdapterFactory implements TypeAdapterFactory {
    @SuppressWarnings("unchecked")
    @Override

From source file com.ibm.watson.developer_cloud.discovery.v1.model.query.AggregationAdapterFactory.java

/**
 * Adapts the abstract {@link Aggregation} to its concrete implementations.
 */
public class AggregationAdapterFactory implements TypeAdapterFactory {
    @SuppressWarnings("unchecked")
    @Override

From source file com.imapi.watermark.transformer.RuntimeTypeAdapterFactory.java

/**
 * Adapts values whose runtime type may differ from their declaration type. This
 * is necessary when a field's type is not the same type that GSON should create
 * when deserializing that field. For example, consider these types:
 * <pre>   {@code
 *   abstract class Shape {

From source file com.javacreed.examples.gson.part2.DataTypeAdapterFactory.java

public class DataTypeAdapterFactory implements TypeAdapterFactory {

    public static class Builder {
        private final Map<Type, AbstractTypeAdapter<?>> adapters = new HashMap<>();

        public <T> Builder add(final Type type, final AbstractTypeAdapter<T> adapter) {

From source file com.javacreed.examples.gson.part3.DataTypeAdapterFactory.java

public class DataTypeAdapterFactory implements TypeAdapterFactory {

    public static class Builder {
        private final Map<Type, AbstractTypeAdapter<?>> adapters = new HashMap<>();

        public <T, E extends T> Builder add(final Class<T> type, final AbstractTypeAdapter<E> adapter) {

From source file com.javacreed.examples.gson.part4.DataTypeAdapterFactory.java

public class DataTypeAdapterFactory implements TypeAdapterFactory {

    public static class Builder {
        private final Map<Type, AbstractTypeAdapter<?>> adapters = new HashMap<>();

        public <T, E extends T> Builder add(final Class<T> type, final AbstractTypeAdapter<E> adapter) {

From source file com.javadeobfuscator.deobfuscator.utils.RuntimeTypeAdapterFactory.java

/**
 * Adapts values whose runtime type may differ from their declaration type. This
 * is necessary when a field's type is not the same type that GSON should create
 * when deserializing that field. For example, consider these types:
 * <pre>   {@code
 *   abstract class Shape {