Class GensonBuilder
- java.lang.Object
-
- com.oracle.coherence.io.json.genson.GensonBuilder
-
- Direct Known Subclasses:
Genson.Builder
public class GensonBuilder extends Object
Use the GensonBuilder class when you want to create a custom Genson instance. This class allows you for example to register custom converters/serializers/deserializerswithConverters(Converter...)or custom converter FactorieswithConverterFactory(Factory). This class combines the GensonBuilder design pattern with template pattern providing handy configuration and extensibility. All its public methods are intended to be used in the GensonBuilder "style" and its protected methods are part of the template. When you callcreate()method, it will start assembling all the configuration and build all the required components by using the protected methods. For example if you wish to use in your projects a GensonBuilder that will always create some customBeanDescriptorProvideryou have to extendcreateBeanDescriptorProvider(), or imagine that you implemented some Converters that you always want to register then overridegetDefaultConverters().- Author:
- Eugen Cepoi
-
-
Constructor Summary
Constructors Constructor Description GensonBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GensonBuilderacceptSingleValueAsList(boolean enable)Wrap a single value into a list when a list is expected.GensonBuilderaddAlias(String alias, Class<?> forClass)Alias used in serialized class metadata instead of the full class name.protected voidaddDefaultContextualFactories(List<ContextualFactory<?>> factories)protected voidaddDefaultConverterFactories(List<Factory<? extends Converter<?>>> factories)Override this method if you want to change the default converter factories.protected voidaddDefaultDeserializerFactories(List<Factory<? extends Deserializer<?>>> deserializerFactories)protected voidaddDefaultSerializerFactories(List<Factory<? extends Serializer<?>>> serializerFactories)GensonBuilderaddPackageAlias(String alias, String forPackage)Similar toaddAlias(String, Class), this allows creating an alias for all serialized classes within a package.Gensoncreate()Creates an instance of Genson.protected Gensoncreate(Factory<Converter<?>> converterFactory, Map<String,Class<?>> classAliases, Map<String,String> packageAliases)In theory this allows you to extend Genson class and to instantiate it, but actually you can not do it as Genson class is final.protected BeanDescriptorProvidercreateBeanDescriptorProvider()Creates the standard BeanDescriptorProvider that will be used to provideBeanDescriptorinstances for serialization/deserialization of all types that couldn't be handled by standard and custom converters and converter factories.protected BeanMutatorAccessorResolvercreateBeanMutatorAccessorResolver()protected BeanPropertyFactorycreateBeanPropertyFactory()protected Factory<Converter<?>>createConverterFactory()You should override this method if you want to add customChainedFactoryor if you need to chain them differently.protected PropertyNameResolvercreatePropertyNameResolver()You can override this method if you want to change thePropertyNameResolverthat are registered by default.GensonBuilderexclude(Class<?> fieldOfType)GensonBuilderexclude(String field)GensonBuilderexclude(String field, Class<?> fromClass)GensonBuilderexclude(String field, Class<?> fromClass, Class<?> ofType)GensonBuilderfailOnMissingProperty(boolean enable)If set to true, Genson will throw a JsonBindingException when it encounters a property in the incoming json that does not match a property in the class.GensonBuilderfailOnNullPrimitive(boolean enabled)False by default.protected BeanDescriptorProvidergetBeanDescriptorProvider()protected BeanViewDescriptorProvidergetBeanViewDescriptorProvider()ClassLoadergetClassLoader()protected List<Converter<?>>getDefaultConverters()You can override this methods if you want to change the default converters (remove some, change the order, etc).protected List<Deserializer<?>>getDefaultDeserializers()protected List<Serializer<?>>getDefaultSerializers()Map<Type,Deserializer<?>>getDeserializersMap()List<Factory<?>>getFactories()protected BeanMutatorAccessorResolvergetMutatorAccessorResolver()protected PropertyNameResolvergetPropertyNameResolver()Map<Type,Serializer<?>>getSerializersMap()GensonBuilderinclude(BeanMutatorAccessorResolver resolver)GensonBuilderinclude(Class<?> fieldOfType)GensonBuilderinclude(String field)GensonBuilderinclude(String field, Class<?> fromClass)GensonBuilderinclude(String field, Class<?> fromClass, Class<?> ofType)booleanisDateAsTimestamp()booleanisHtmlSafe()booleanisSkipNull()booleanisThrowExceptionOnNoDebugInfo()GensonBuilderrename(Class<?> fieldOfType, String toName)Renames all fields of type fieldOfType to toName.GensonBuilderrename(String field, Class<?> fromClass, String toName)Renames all fields named field declared in class fromClass to toName.GensonBuilderrename(String field, Class<?> fromClass, String toName, Class<?> ofType)Renames all fields named field, of type fieldOfType and declared in fromClass to toName.GensonBuilderrename(String field, String toName)Renames all fields named field to toName.GensonBuilderrename(String field, String toName, Class<?> fieldOfType)Renames all fields named field and of type fieldOfType to toName.GensonBuilderset(BeanMutatorAccessorResolver resolver)Replaces defaultBeanMutatorAccessorResolverby the specified one.GensonBuilderset(PropertyNameResolver resolver)Replaces defaultPropertyNameResolverby the specified one.GensonBuildersetConstructorFilter(VisibilityFilter constructorFilter)GensonBuildersetDefaultType(ValueType type, Class<?> clazz)Set the class to use for deserialization of the specifiedValueTypewhen the Java type cannot be determined based on static type information or JSON metadata.GensonBuildersetFieldFilter(VisibilityFilter propertyFilter)GensonBuildersetHtmlSafe(boolean htmlSafe)If true \,<,>,&,= characters will be replaced by ', <, >, &, =GensonBuildersetMethodFilter(VisibilityFilter methodFilter)GensonBuildersetSkipNull(boolean skipNull)If true will not serialize null valuesGensonBuildersetThrowExceptionIfNoDebugInfo(boolean throwExcOnNoDebugInfo)Used in conjunction withuseConstructorWithArguments(boolean).GensonBuilderuseBeanViews(boolean enabled)If trueBeanViewmechanism will be enabled.GensonBuilderuseByteAsInt(boolean enable)GensonBuilderuseClassMetadata(boolean enabled)Indicates whether class metadata should be serialized and used during deserialization.GensonBuilderuseClassMetadataWithStaticType(boolean enable)If set to false, during serialization class metadata will be serialized only for types where the runtime type differs from the static one.GensonBuilderuseConstructorWithArguments(boolean enabled)If true constructor and method arguments name will be resolved from the generated debug symbols during compilation.GensonBuilderuseDateAsTimestamp(boolean enabled)GensonBuilderuseDateFormat(DateFormat dateFormat)Specifies the data format that should be used for java.util.Date serialization and deserialization.GensonBuilderuseDefaultValue(Object value, Class<?> targetType)Uses the passed value as the default value for this type.GensonBuilderuseFields(boolean enabled)If true, fields will be used when no getter/setter is available, except if you specified that no getter/setter should be used withuseMethods(boolean), in that case only fields will be used.GensonBuilderuseFields(boolean enabled, VisibilityFilter visibility)GensonBuilderuseIndentation(boolean indent)If true outputed json will be indented using two spaces, otherwise (by default) all is printed on same line.GensonBuilderuseMetadata(boolean metadata)GensonBuilderuseMethods(boolean enabled)If true, getters and setters would be used during serialization/deserialization in favor of fields.GensonBuilderuseMethods(boolean enabled, VisibilityFilter visibility)GensonBuilderuseRuntimePropertyFilter(RuntimePropertyFilter filter)GensonBuilderuseRuntimeType(boolean enabled)If true the concrete type of the serialized object will always be used.GensonBuilderuseStrictDoubleParse(boolean strictDoubleParse)GensonBuilderuseUnknownPropertyHandler(UnknownPropertyHandler handler)GensonBuilderwith(BeanMutatorAccessorResolver... resolvers)Register additional BeanMutatorAccessorResolver that will be used before the standard ones.GensonBuilderwith(PropertyNameResolver... resolvers)Registers the specified resolvers in the order they were defined and before the standard ones.GensonBuilderwithBeanPropertyFactory(BeanPropertyFactory... factories)Allows you to register new BeanPropertyFactory responsible of creating BeanProperty accessors, mutators and BeanCreators.GensonBuilderwithBundle(GensonBundle... bundles)Register some genson bundles.GensonBuilderwithClassLoader(ClassLoader loader)Override the default classloaderGensonBuilderwithContextualFactory(ContextualFactory<?>... factories)ContextualFactory is actually in a beta status, it will not be removed, but might be refactored.<T> GensonBuilderwithConverter(Converter<T> converter, GenericType<? extends T> type)Register converter by mapping it to the parameterized type of type argument.<T> GensonBuilderwithConverter(Converter<T> converter, Class<? extends T> type)Register converter by mapping it to type argument.GensonBuilderwithConverterFactory(ChainedFactory chainedFactory)A ChainedFactory provides a way to use custom Converters that have access to the default Converters.GensonBuilderwithConverterFactory(Factory<? extends Converter<?>> factory)Registers converter factories.GensonBuilderwithConverterFactory(Modifier<ChainedFactory> modifier)GensonBuilderwithConverters(Converter<?>... converter)Registers converters mapping them to their corresponding parameterized type.<T> GensonBuilderwithDeserializer(Deserializer<T> deserializer, GenericType<? extends T> type)<T> GensonBuilderwithDeserializer(Deserializer<T> deserializer, Class<? extends T> type)GensonBuilderwithDeserializerFactory(Factory<? extends Deserializer<?>> factory)Registers deserializer factories.GensonBuilderwithDeserializers(Deserializer<?>... deserializer)<T> GensonBuilderwithSerializer(Serializer<T> serializer, GenericType<? extends T> type)<T> GensonBuilderwithSerializer(Serializer<T> serializer, Class<? extends T> type)GensonBuilderwithSerializerFactory(Factory<? extends Serializer<?>> factory)Registers serializer factories.GensonBuilderwithSerializers(Serializer<?>... serializer)GensonBuilderwrapRootValues(String inputKey, String outputKey)Will wrap all the root objects under outputKey during serializaiton and unwrap the content under inputKey during deserializaiton.
-
-
-
Method Detail
-
setDefaultType
public GensonBuilder setDefaultType(ValueType type, Class<?> clazz)
Set the class to use for deserialization of the specifiedValueTypewhen the Java type cannot be determined based on static type information or JSON metadata.- Parameters:
type- theValueTypeto set the default class forclazz- the default class for the specifiedValueType- Returns:
- a reference to this builder
-
addAlias
public GensonBuilder addAlias(String alias, Class<?> forClass)
Alias used in serialized class metadata instead of the full class name. SeeClassMetadataConverterfor more metadata. If you add an alias, it will automatically enable the class metadata feature, as if you useduseClassMetadata(boolean).- Parameters:
alias-forClass-- Returns:
- a reference to this builder.
-
addPackageAlias
public GensonBuilder addPackageAlias(String alias, String forPackage)
Similar toaddAlias(String, Class), this allows creating an alias for all serialized classes within a package. When a class is present within the specified package, instead of the full class name being serialized, it will generate the following String:alias + '.' + className- Parameters:
alias- alias for classes within a specific package. The provided value must not contain a period (.)forPackage- the package to which the alias will be applied- Returns:
- a reference to this builder
- Throws:
IllegalArgumentException- ifaliascontains a period- Since:
- 2.0
- See Also:
addAlias(String, Class)
-
withConverters
public GensonBuilder withConverters(Converter<?>... converter)
Registers converters mapping them to their corresponding parameterized type.- Parameters:
converter-- Returns:
- a reference to this builder.
-
withConverter
public <T> GensonBuilder withConverter(Converter<T> converter, Class<? extends T> type)
Register converter by mapping it to type argument.- Parameters:
converter- to registertype- of objects this converter handles- Returns:
- a reference to this builder.
-
withConverter
public <T> GensonBuilder withConverter(Converter<T> converter, GenericType<? extends T> type)
Register converter by mapping it to the parameterized type of type argument.- Parameters:
converter- to registertype- of objects this converter handles- Returns:
- a reference to this builder.
-
withSerializers
public GensonBuilder withSerializers(Serializer<?>... serializer)
-
withSerializer
public <T> GensonBuilder withSerializer(Serializer<T> serializer, Class<? extends T> type)
-
withSerializer
public <T> GensonBuilder withSerializer(Serializer<T> serializer, GenericType<? extends T> type)
-
withDeserializers
public GensonBuilder withDeserializers(Deserializer<?>... deserializer)
-
withDeserializer
public <T> GensonBuilder withDeserializer(Deserializer<T> deserializer, Class<? extends T> type)
-
withDeserializer
public <T> GensonBuilder withDeserializer(Deserializer<T> deserializer, GenericType<? extends T> type)
-
withConverterFactory
public GensonBuilder withConverterFactory(Factory<? extends Converter<?>> factory)
Registers converter factories.- Parameters:
factory- to register- Returns:
- a reference to this builder.
-
withSerializerFactory
public GensonBuilder withSerializerFactory(Factory<? extends Serializer<?>> factory)
Registers serializer factories.- Parameters:
factory- to register- Returns:
- a reference to this builder.
-
withDeserializerFactory
public GensonBuilder withDeserializerFactory(Factory<? extends Deserializer<?>> factory)
Registers deserializer factories.- Parameters:
factory- to register- Returns:
- a reference to this builder.
-
withContextualFactory
public GensonBuilder withContextualFactory(ContextualFactory<?>... factories)
ContextualFactory is actually in a beta status, it will not be removed, but might be refactored.
-
withConverterFactory
public GensonBuilder withConverterFactory(ChainedFactory chainedFactory)
A ChainedFactory provides a way to use custom Converters that have access to the default Converters. An example of use is to wrap incoming/outgoing json in a root object and delegate then the ser/de to the default Converter. This mechanism is internally used by Genson to decorate the different Converters with additional behaviour (null handling, ser/de of polymorphic types with class info, runtime type based ser/de, etc). Note that you can't use it in situations where you want to start reading/writing some partial infos and want to delegate the rest to the default Converter.
-
withConverterFactory
public GensonBuilder withConverterFactory(Modifier<ChainedFactory> modifier)
-
withBeanPropertyFactory
public GensonBuilder withBeanPropertyFactory(BeanPropertyFactory... factories)
Allows you to register new BeanPropertyFactory responsible of creating BeanProperty accessors, mutators and BeanCreators. This is a very low level feature, you probably don't need it.
-
withBundle
public GensonBuilder withBundle(GensonBundle... bundles)
Register some genson bundles. For example to enable JAXB support:builder.withBundle(new JAXBExtension());
All bundles should be registered before any other customization.- See Also:
GensonBundle
-
withClassLoader
public GensonBuilder withClassLoader(ClassLoader loader)
Override the default classloader- Parameters:
loader- classloader which will be used to load classes while deserializing- Returns:
- a reference to this builder
-
set
public GensonBuilder set(BeanMutatorAccessorResolver resolver)
Replaces defaultBeanMutatorAccessorResolverby the specified one.- Parameters:
resolver-- Returns:
- a reference to this builder.
-
set
public GensonBuilder set(PropertyNameResolver resolver)
Replaces defaultPropertyNameResolverby the specified one.- Parameters:
resolver-- Returns:
- a reference to this builder.
-
with
public GensonBuilder with(BeanMutatorAccessorResolver... resolvers)
Register additional BeanMutatorAccessorResolver that will be used before the standard ones.- Parameters:
resolvers-- Returns:
- a reference to this builder.
-
getSerializersMap
public Map<Type,Serializer<?>> getSerializersMap()
-
getDeserializersMap
public Map<Type,Deserializer<?>> getDeserializersMap()
-
getClassLoader
public ClassLoader getClassLoader()
-
with
public GensonBuilder with(PropertyNameResolver... resolvers)
Registers the specified resolvers in the order they were defined and before the standard ones.- Parameters:
resolvers-- Returns:
- a reference to this builder.
-
rename
public GensonBuilder rename(String field, String toName)
Renames all fields named field to toName.
-
rename
public GensonBuilder rename(Class<?> fieldOfType, String toName)
Renames all fields of type fieldOfType to toName.
-
rename
public GensonBuilder rename(String field, Class<?> fromClass, String toName)
Renames all fields named field declared in class fromClass to toName.
-
rename
public GensonBuilder rename(String field, String toName, Class<?> fieldOfType)
Renames all fields named field and of type fieldOfType to toName.
-
rename
public GensonBuilder rename(String field, Class<?> fromClass, String toName, Class<?> ofType)
Renames all fields named field, of type fieldOfType and declared in fromClass to toName.
-
exclude
public GensonBuilder exclude(String field)
-
exclude
public GensonBuilder exclude(Class<?> fieldOfType)
-
exclude
public GensonBuilder exclude(String field, Class<?> fromClass)
-
exclude
public GensonBuilder exclude(String field, Class<?> fromClass, Class<?> ofType)
-
include
public GensonBuilder include(String field)
-
include
public GensonBuilder include(Class<?> fieldOfType)
-
include
public GensonBuilder include(BeanMutatorAccessorResolver resolver)
-
include
public GensonBuilder include(String field, Class<?> fromClass)
-
include
public GensonBuilder include(String field, Class<?> fromClass, Class<?> ofType)
-
setSkipNull
public GensonBuilder setSkipNull(boolean skipNull)
If true will not serialize null values- Parameters:
skipNull- indicates whether null values should be serialized or not.- Returns:
- a reference to this builder.
-
isSkipNull
public boolean isSkipNull()
-
setHtmlSafe
public GensonBuilder setHtmlSafe(boolean htmlSafe)
If true \,<,>,&,= characters will be replaced by ', <, >, &, =- Parameters:
htmlSafe- indicates whether serialized data should be html safe.- Returns:
- a reference to this builder.
-
isHtmlSafe
public boolean isHtmlSafe()
-
useClassMetadata
public GensonBuilder useClassMetadata(boolean enabled)
Indicates whether class metadata should be serialized and used during deserialization.- See Also:
ClassMetadataConverter
-
useDateFormat
public GensonBuilder useDateFormat(DateFormat dateFormat)
Specifies the data format that should be used for java.util.Date serialization and deserialization.- Parameters:
dateFormat-- Returns:
- a reference to this builder.
-
isThrowExceptionOnNoDebugInfo
public boolean isThrowExceptionOnNoDebugInfo()
-
setThrowExceptionIfNoDebugInfo
public GensonBuilder setThrowExceptionIfNoDebugInfo(boolean throwExcOnNoDebugInfo)
Used in conjunction withuseConstructorWithArguments(boolean). If true an exception will be thrown when a class has been compiled without debug informations.- Parameters:
throwExcOnNoDebugInfo-- Returns:
- a reference to this builder.
- See Also:
ASMCreatorParameterNameResolver
-
useMethods
public GensonBuilder useMethods(boolean enabled)
If true, getters and setters would be used during serialization/deserialization in favor of fields. If there is not getter/setter for a field then the field will be used, except if you specified that fields should not be used withuseFields(boolean). By default getters, setters and fields will be used.
-
useMethods
public GensonBuilder useMethods(boolean enabled, VisibilityFilter visibility)
-
useFields
public GensonBuilder useFields(boolean enabled)
If true, fields will be used when no getter/setter is available, except if you specified that no getter/setter should be used withuseMethods(boolean), in that case only fields will be used. By default getters, setters and fields will be used.
-
useFields
public GensonBuilder useFields(boolean enabled, VisibilityFilter visibility)
-
useBeanViews
public GensonBuilder useBeanViews(boolean enabled)
If trueBeanViewmechanism will be enabled.
-
useRuntimeType
public GensonBuilder useRuntimeType(boolean enabled)
If true the concrete type of the serialized object will always be used. So if you have Listtype it will not use the Number serializer but the one for the concrete type of the current value. - Parameters:
enabled-- Returns:
- a reference to this builder.
-
useConstructorWithArguments
public GensonBuilder useConstructorWithArguments(boolean enabled)
If true constructor and method arguments name will be resolved from the generated debug symbols during compilation. It is a very powerful feature from Genson, you should have a look atASMCreatorParameterNameResolver.- Parameters:
enabled-- Returns:
- a reference to this builder.
- See Also:
setThrowExceptionIfNoDebugInfo(boolean)
-
setFieldFilter
public GensonBuilder setFieldFilter(VisibilityFilter propertyFilter)
-
setMethodFilter
public GensonBuilder setMethodFilter(VisibilityFilter methodFilter)
-
setConstructorFilter
public GensonBuilder setConstructorFilter(VisibilityFilter constructorFilter)
-
useStrictDoubleParse
public GensonBuilder useStrictDoubleParse(boolean strictDoubleParse)
-
useIndentation
public GensonBuilder useIndentation(boolean indent)
If true outputed json will be indented using two spaces, otherwise (by default) all is printed on same line.
-
useDateAsTimestamp
public GensonBuilder useDateAsTimestamp(boolean enabled)
-
useMetadata
public GensonBuilder useMetadata(boolean metadata)
-
useByteAsInt
public GensonBuilder useByteAsInt(boolean enable)
-
failOnMissingProperty
public GensonBuilder failOnMissingProperty(boolean enable)
If set to true, Genson will throw a JsonBindingException when it encounters a property in the incoming json that does not match a property in the class. False by default.- Parameters:
enable-- Returns:
-
useClassMetadataWithStaticType
public GensonBuilder useClassMetadataWithStaticType(boolean enable)
If set to false, during serialization class metadata will be serialized only for types where the runtime type differs from the static one. Ex:class Person { public Address address; }Here if the concrete instance of address is Address then this type will not be serialized as metadata, but if they differ then it is serialized. By default this option is true, all types are serialized.- Parameters:
enable-- Returns:
-
acceptSingleValueAsList
public GensonBuilder acceptSingleValueAsList(boolean enable)
Wrap a single value into a list when a list is expected. Useful when dealing with APIs that unwrap arrays containing a single value. Disabled by default.
-
useDefaultValue
public GensonBuilder useDefaultValue(Object value, Class<?> targetType)
Uses the passed value as the default value for this type.
-
wrapRootValues
public GensonBuilder wrapRootValues(String inputKey, String outputKey)
Will wrap all the root objects under outputKey during serializaiton and unwrap the content under inputKey during deserializaiton. For example:Genson genson = new GensonBuilder().wrapRootValues("request", "response").create(); // would produce: {"response": {... person properties ...}} genson.serialize(person); Person p = genson.deserialize("{\"request\":{...}}", Person.class);If you need this mechanism only for some types or using different root keys, then you can register JaxbBundle with wrapRootValues(true) and annotate the specific classes with XmlRootElement.
-
failOnNullPrimitive
public GensonBuilder failOnNullPrimitive(boolean enabled)
False by default. When enabled a JsonBindingException will be thrown if null is encountered during serialization (should never happen) or deserialization for a primitive type.
-
useRuntimePropertyFilter
public GensonBuilder useRuntimePropertyFilter(RuntimePropertyFilter filter)
-
useUnknownPropertyHandler
public GensonBuilder useUnknownPropertyHandler(UnknownPropertyHandler handler)
-
create
public Genson create()
Creates an instance of Genson. You may use this method as many times you want. It wont change the state of the builder, in sense that the returned instance will have always the same configuration.- Returns:
- a new instance of Genson built for the current configuration.
-
create
protected Genson create(Factory<Converter<?>> converterFactory, Map<String,Class<?>> classAliases, Map<String,String> packageAliases)
In theory this allows you to extend Genson class and to instantiate it, but actually you can not do it as Genson class is final. If some uses cases are discovered it may change.- Parameters:
converterFactory-classAliases-- Returns:
- a new Genson instance.
-
createConverterFactory
protected Factory<Converter<?>> createConverterFactory()
You should override this method if you want to add customChainedFactoryor if you need to chain them differently.- Returns:
- the converter factory instance that will be used to resolve ALL converters.
-
createBeanMutatorAccessorResolver
protected BeanMutatorAccessorResolver createBeanMutatorAccessorResolver()
-
createPropertyNameResolver
protected PropertyNameResolver createPropertyNameResolver()
You can override this method if you want to change thePropertyNameResolverthat are registered by default. You can also simply replace the default PropertyNameResolver by setting another one withset(PropertyNameResolver).- Returns:
- the property name resolver to be used. It should be an instance of
PropertyNameResolver.CompositePropertyNameResolver, otherwise you will not be able to add others PropertyNameResolvers usingwith(PropertyNameResolver...)method.
-
getDefaultConverters
protected List<Converter<?>> getDefaultConverters()
You can override this methods if you want to change the default converters (remove some, change the order, etc).- Returns:
- the default converters list, must be not null.
-
addDefaultConverterFactories
protected void addDefaultConverterFactories(List<Factory<? extends Converter<?>>> factories)
Override this method if you want to change the default converter factories.- Parameters:
factories- list, is not null.
-
addDefaultContextualFactories
protected void addDefaultContextualFactories(List<ContextualFactory<?>> factories)
-
getDefaultSerializers
protected List<Serializer<?>> getDefaultSerializers()
-
addDefaultSerializerFactories
protected void addDefaultSerializerFactories(List<Factory<? extends Serializer<?>>> serializerFactories)
-
getDefaultDeserializers
protected List<Deserializer<?>> getDefaultDeserializers()
-
addDefaultDeserializerFactories
protected void addDefaultDeserializerFactories(List<Factory<? extends Deserializer<?>>> deserializerFactories)
-
createBeanDescriptorProvider
protected BeanDescriptorProvider createBeanDescriptorProvider()
Creates the standard BeanDescriptorProvider that will be used to provideBeanDescriptorinstances for serialization/deserialization of all types that couldn't be handled by standard and custom converters and converter factories.- Returns:
- the BeanDescriptorProvider instance.
-
createBeanPropertyFactory
protected BeanPropertyFactory createBeanPropertyFactory()
-
getPropertyNameResolver
protected final PropertyNameResolver getPropertyNameResolver()
-
getMutatorAccessorResolver
protected final BeanMutatorAccessorResolver getMutatorAccessorResolver()
-
getBeanDescriptorProvider
protected final BeanDescriptorProvider getBeanDescriptorProvider()
-
getBeanViewDescriptorProvider
protected final BeanViewDescriptorProvider getBeanViewDescriptorProvider()
-
isDateAsTimestamp
public final boolean isDateAsTimestamp()
-
-