org.jclouds.json.internal
Class IgnoreNullIterableTypeAdapterFactory
java.lang.Object
org.jclouds.json.internal.IgnoreNullIterableTypeAdapterFactory
- All Implemented Interfaces:
- com.google.gson.TypeAdapterFactory
public class IgnoreNullIterableTypeAdapterFactory
- extends Object
- implements com.google.gson.TypeAdapterFactory
Eliminates null values when deserializing Iterables
Treats [null] as the empty set; [A, null] as [A]; etc.
- Author:
- Adam Lowe
|
Method Summary |
<T> com.google.gson.TypeAdapter<T> |
|
create(com.google.gson.Gson gson,
com.google.gson.reflect.TypeToken<T> typeToken)
|
protected
<E> com.google.gson.TypeAdapter<Iterable<E>> |
|
newIterableAdapter(com.google.gson.TypeAdapter<E> elementAdapter)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IgnoreNullIterableTypeAdapterFactory
public IgnoreNullIterableTypeAdapterFactory()
create
public <T> com.google.gson.TypeAdapter<T> create(com.google.gson.Gson gson,
com.google.gson.reflect.TypeToken<T> typeToken)
- Specified by:
create in interface com.google.gson.TypeAdapterFactory
newIterableAdapter
protected <E> com.google.gson.TypeAdapter<Iterable<E>> newIterableAdapter(com.google.gson.TypeAdapter<E> elementAdapter)
Copyright © 2009-2013 jclouds. All Rights Reserved.