public class GsonMappingProvider extends Object implements MappingProvider
Constructor and Description |
---|
GsonMappingProvider() |
GsonMappingProvider(Callable<com.google.gson.Gson> factory) |
GsonMappingProvider(com.google.gson.Gson gson) |
Modifier and Type | Method and Description |
---|---|
<T> T |
map(Object source,
Class<T> targetType,
Configuration configuration) |
<T> T |
map(Object source,
TypeRef<T> targetType,
Configuration configuration) |
public GsonMappingProvider(com.google.gson.Gson gson)
public GsonMappingProvider(Callable<com.google.gson.Gson> factory)
public GsonMappingProvider()
public <T> T map(Object source, Class<T> targetType, Configuration configuration)
map
in interface MappingProvider
T
- the mapped result typesource
- object to maptargetType
- the type the source object should be mapped toconfiguration
- current configurationpublic <T> T map(Object source, TypeRef<T> targetType, Configuration configuration)
map
in interface MappingProvider
T
- the mapped result typesource
- object to maptargetType
- the type the source object should be mapped toconfiguration
- current configurationCopyright © 2020. All rights reserved.