public final class GsonFireBuilder extends Object
| Constructor and Description |
|---|
GsonFireBuilder() |
| Modifier and Type | Method and Description |
|---|---|
GsonFireBuilder |
addSerializationExclusionStrategy(FireExclusionStrategy exclusionStrategy) |
com.google.gson.Gson |
createGson()
Returns a new
Gson instance |
com.google.gson.GsonBuilder |
createGsonBuilder()
Returns a new instance of the good old
GsonBuilder |
GsonFireBuilder |
dateSerializationPolicy(DateSerializationPolicy policy)
Configures the resulting Gson to serialize/unserialize Date instances with a policy
|
GsonFireBuilder |
enableExclusionByValue()
By enabling this, all exclusion by value strategies specified with the annotation
ExcludeByValue will be run to remove specific fields from the resulting json |
GsonFireBuilder |
enableExposeMethodResult()
By enabling this, all methods with the annotation
ExposeMethodResult will
be evaluated and it result will be added to the resulting json |
GsonFireBuilder |
enableHooks(Class clazz)
By enabling this, all methods with the annotation
ExposeMethodResult will
be evaluated and it result will be added to the resulting json |
GsonFireBuilder |
enableMergeMaps(Class clazz)
Deprecated.
|
<T> GsonFireBuilder |
registerPostProcessor(Class<T> clazz,
PostProcessor<? super T> postProcessor)
Registers a Post processor for the Class specified.
|
<T> GsonFireBuilder |
registerPreProcessor(Class<T> clazz,
PreProcessor<? super T> preProcessor)
Registers a pre processor for the Class specified.
|
<T> GsonFireBuilder |
registerTypeSelector(Class<T> clazz,
TypeSelector<T> factory)
Registers a Type selector for the Class specified.
|
GsonFireBuilder |
serializeTimeZone(TimeZone timeZone)
Sets the serialization TimeZone.
|
public <T> GsonFireBuilder registerTypeSelector(Class<T> clazz, TypeSelector<T> factory)
T - clazz - factory - public <T> GsonFireBuilder registerPostProcessor(Class<T> clazz, PostProcessor<? super T> postProcessor)
T - clazz - postProcessor - public <T> GsonFireBuilder registerPreProcessor(Class<T> clazz, PreProcessor<? super T> preProcessor)
T - clazz - preProcessor - public GsonFireBuilder dateSerializationPolicy(DateSerializationPolicy policy)
policy - public GsonFireBuilder enableExposeMethodResult()
ExposeMethodResult will
be evaluated and it result will be added to the resulting jsonpublic GsonFireBuilder enableExclusionByValue()
ExcludeByValue will be run to remove specific fields from the resulting jsonpublic GsonFireBuilder enableHooks(Class clazz)
ExposeMethodResult will
be evaluated and it result will be added to the resulting json@Deprecated public GsonFireBuilder enableMergeMaps(Class clazz)
Map class
annotated with MergeMap, the map will be walked and merged
with the resulting json object.
This method has been deprecated and a PostProcessor should be used insteadpublic GsonFireBuilder serializeTimeZone(TimeZone timeZone)
timeZone - public GsonFireBuilder addSerializationExclusionStrategy(FireExclusionStrategy exclusionStrategy)
public com.google.gson.GsonBuilder createGsonBuilder()
GsonBuilderpublic com.google.gson.Gson createGson()
Gson instanceCopyright © 2016. All rights reserved.