org.immutables.fixture.nullable.GsonAdaptersNullableAttributes Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of value-fixture Show documentation
Show all versions of value-fixture Show documentation
Module that contains all tests for the code generation capability
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.Collections;
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", "MethodCanBeStatic"})
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@org.immutables.value.Generated(from = "org.immutables.fixture.nullable", generator = "Gsons")
public final class GsonAdaptersNullableAttributes implements TypeAdapterFactory {
@SuppressWarnings({"unchecked", "rawtypes"}) // 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)";
}
@org.immutables.value.Generated(from = "NullableAttributes", generator = "Gsons")
@SuppressWarnings({"unchecked", "rawtypes"}) // safe unchecked, types are verified in runtime
private static class NullableAttributesTypeAdapter extends TypeAdapter {
public final Integer integerTypeSample = null;
public final Integer setTypeSample = null;
public final Integer arrayTypeSample = null;
public final Double defArrayTypeSample = null;
public final Object mapSecondaryTypeSample = null;
private final TypeAdapter integerTypeAdapter;
private final TypeAdapter setTypeAdapter;
private final TypeAdapter arrayTypeAdapter;
private final TypeAdapter defArrayTypeAdapter;
private final TypeAdapter
© 2015 - 2024 Weber Informatics LLC | Privacy Policy