List of usage examples for com.google.gson TypeAdapter subclass-usage
From source file ooo.oxo.mr.net.ColorTypeAdapter.java
public class ColorTypeAdapter extends TypeAdapter<Color> { @Override public void write(JsonWriter out, Color value) throws IOException { if (value == null) { out.nullValue();
From source file org.aku.sm.smclient.service.DateTypeAdapter.java
/**
* Adapter for Date. Although this class appears stateless, it is not.
* DateFormat captures its time zone and locale when it is created, which gives
* this class state. DateFormat isn't thread safe either, so this class has
* to synchronize its read and write methods.
*/
From source file org.apache.carbondata.core.metadata.datatype.DataTypeAdapter.java
/** * This class is added to support backward compatibility with table info object, where DATATYPE * is string in old version(1.2) and OBJECT in new version(1.3) */ public class DataTypeAdapter extends TypeAdapter<Object> {
From source file org.apache.jclouds.oneandone.rest.util.ServerFirewallPolicyAdapter.java
public class ServerFirewallPolicyAdapter<T> extends TypeAdapter<List<T>> { private com.google.gson.reflect.TypeToken<T> adapterclass; private Gson gson; public ServerFirewallPolicyAdapter(com.google.gson.reflect.TypeToken<T> adapterclass) {
From source file org.apache.jclouds.oneandone.rest.util.SnapshotAdapter.java
public class SnapshotAdapter<T> extends TypeAdapter<List<T>> { private com.google.gson.reflect.TypeToken<T> adapterclass; private Gson gson; public SnapshotAdapter(com.google.gson.reflect.TypeToken<T> adapterclass) {
From source file org.cgiar.ccafs.marlo.utils.BigDecimalTypeAdapter.java
public class BigDecimalTypeAdapter extends TypeAdapter<BigDecimal> { @Override public BigDecimal read(JsonReader jsonReader) throws IOException {
From source file org.cgiar.ccafs.marlo.utils.DateTypeAdapter.java
public class DateTypeAdapter extends TypeAdapter<Date> { private final DateFormat enUsFormat = DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT, Locale.US); private final DateFormat localFormat = DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT);
From source file org.cgiar.ccafs.marlo.utils.DoubleTypeAdapter.java
/** * @author Hermes Jimnez - CIAT/CCAFS */ public class DoubleTypeAdapter extends TypeAdapter<Double> { @Override
From source file org.cgiar.ccafs.marlo.utils.FloatTypeAdapter.java
/** * @author Hermes Jimnez - CIAT/CCAFS */ public class FloatTypeAdapter extends TypeAdapter<Float> { @Override
From source file org.cgiar.ccafs.marlo.utils.IntegerTypeAdapter.java
public class IntegerTypeAdapter extends TypeAdapter<Number> { @Override public Number read(JsonReader jsonReader) throws IOException {