Package org.jdbi.v3.gson2
Class Gson2Config
- java.lang.Object
-
- org.jdbi.v3.gson2.Gson2Config
-
- All Implemented Interfaces:
JdbiConfig<Gson2Config>
public class Gson2Config extends java.lang.Object implements JdbiConfig<Gson2Config>
Configuration class for Gson 2 integration.
-
-
Field Summary
Fields Modifier and Type Field Description private com.google.gson.Gsongson
-
Constructor Summary
Constructors Modifier Constructor Description Gson2Config()privateGson2Config(Gson2Config other)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Gson2ConfigcreateCopy()Returns a copy of this configuration object.com.google.gson.GsongetGson()Returns theGsonobject used for json conversion.Gson2ConfigsetGson(com.google.gson.Gson gson)Set theGsonto use for json conversion.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jdbi.v3.core.config.JdbiConfig
setRegistry
-
-
-
-
Constructor Detail
-
Gson2Config
public Gson2Config()
-
Gson2Config
private Gson2Config(Gson2Config other)
-
-
Method Detail
-
setGson
public Gson2Config setGson(com.google.gson.Gson gson)
Set theGsonto use for json conversion.- Parameters:
gson- the mapper to use- Returns:
- this
-
getGson
public com.google.gson.Gson getGson()
Returns theGsonobject used for json conversion.- Returns:
- the
Gsonobject used for json conversion.
-
createCopy
public Gson2Config createCopy()
Description copied from interface:JdbiConfigReturns a copy of this configuration object. Changes to the copy should not modify the original, and vice-versa.- Specified by:
createCopyin interfaceJdbiConfig<Gson2Config>- Returns:
- a copy of this configuration object.
-
-