org.immutables.fixture.nullable.GsonAdaptersNullableAttributes Maven / Gradle / Ivy
package org.immutables.fixture.nullable;
import com.google.gson.*;
import com.google.gson.reflect.*;
import com.google.gson.stream.*;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.annotation.Generated;
import javax.annotation.Nullable;
import javax.annotation.ParametersAreNonnullByDefault;
/**
* A {@code TypeAdapterFactory} that handles all of the immutable types generated under {@code NullableAttributes}.
* @see ImmutableNullableAttributes
*/
@SuppressWarnings("all")
@Generated({"Gsons.generator", "org.immutables.fixture.nullable.NullableAttributes"})
@ParametersAreNonnullByDefault
public final class GsonAdaptersNullableAttributes implements TypeAdapterFactory {
@SuppressWarnings({"unchecked", "raw"}) // safe unchecked, types are verified in runtime
@Override
public TypeAdapter create(Gson gson, TypeToken type) {
if (NullableAttributesTypeAdapter.adapts(type)) {
return (TypeAdapter) new NullableAttributesTypeAdapter(gson);
}
return null;
}
@Override
public String toString() {
return "GsonAdaptersNullableAttributes(NullableAttributes)";
}
@SuppressWarnings({"unchecked", "raw"}) // safe unchecked, types are verified in runtime
private static class NullableAttributesTypeAdapter extends TypeAdapter {
private final Integer integerTypeSample = null;
private final Integer arrayTypeSample = null;
private final Double defArrayTypeSample = null;
private final Object mapSecondaryTypeSample = null;
private final TypeAdapter integerTypeAdapter;
private final TypeAdapter arrayTypeAdapter;
private final TypeAdapter defArrayTypeAdapter;
private final TypeAdapter
© 2015 - 2025 Weber Informatics LLC | Privacy Policy