Package | Description |
---|---|
com.owlike.genson |
This package contains Genson base classes, to start
with have a look at
Genson . |
com.owlike.genson.convert |
This package provides some default
Converter implementations and
the chained factory and converter decorator mechanisms. |
com.owlike.genson.ext.guava | |
com.owlike.genson.ext.jodatime | |
com.owlike.genson.ext.jsr353 | |
com.owlike.genson.reflect |
This package contains the core api providing databinding support for complex objects.
|
Modifier and Type | Method and Description |
---|---|
<T> Converter<T> |
Genson.provideConverter(Type forType)
Provides an instance of Converter capable of handling objects of type forType.
|
Modifier and Type | Method and Description |
---|---|
protected Factory<Converter<?>> |
GensonBuilder.createConverterFactory()
You should override this method if you want to add custom
ChainedFactory or if you need to chain
them differently. |
protected List<Converter<?>> |
GensonBuilder.getDefaultConverters()
You can override this methods if you want to change the default converters (remove some,
change the order, etc).
|
Modifier and Type | Method and Description |
---|---|
<T> GensonBuilder |
GensonBuilder.withConverter(Converter<T> converter,
Class<? extends T> type)
Register converter by mapping it to type argument.
|
<T> GensonBuilder |
GensonBuilder.withConverter(Converter<T> converter,
GenericType<? extends T> type)
Register converter by mapping it to the parameterized type of type argument.
|
GensonBuilder |
GensonBuilder.withConverters(Converter<?>... converter)
Registers converters mapping them to their corresponding parameterized type.
|
Modifier and Type | Method and Description |
---|---|
protected void |
GensonBuilder.addDefaultConverterFactories(List<Factory<? extends Converter<?>>> factories)
Override this method if you want to change the default converter factories.
|
protected Genson |
GensonBuilder.create(Factory<Converter<?>> converterFactory,
Map<String,Class<?>> classAliases)
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.
|
GensonBuilder |
GensonBuilder.withConverterFactory(Factory<? extends Converter<?>> factory)
Registers converter factories.
|
Constructor and Description |
---|
Genson(Factory<Converter<?>> converterFactory,
BeanDescriptorProvider beanDescProvider,
boolean skipNull,
boolean htmlSafe,
Map<String,Class<?>> classAliases,
boolean withClassMetadata,
boolean strictDoubleParse,
boolean indent,
boolean withMetadata,
boolean failOnMissingProperty,
Map<Class<?>,Object> defaultValues,
RuntimePropertyFilter runtimePropertyFilter)
Instead of using this constructor you should use
GensonBuilder . |
Modifier and Type | Method and Description |
---|---|
<T extends Factory<? extends Converter<?>>> |
ChainedFactory.append(T next) |
<T extends Factory<? extends Converter<?>>> |
ChainedFactory.withNext(T next)
Chains this factory with next and returns next (the tail) so you can do things like
chain1.withNext(new chain2).withNext(new chain3); the resulting chain is
chain1=>chain2=>chain3.
|
Modifier and Type | Method and Description |
---|---|
Converter |
DefaultConverters.DateContextualFactory.create(BeanProperty property,
Genson genson) |
Converter<Object> |
DefaultConverters.PropertyConverterFactory.create(BeanProperty property,
Genson genson) |
Converter<T> |
ContextualFactory.create(BeanProperty property,
Genson genson)
Return an instance of a converter working with objects of type T based on property argument
or null.
|
Converter<Collection<?>> |
DefaultConverters.SingleValueAsListFactory.create(Type type,
Genson genson) |
Converter<Collection<?>> |
DefaultConverters.CollectionConverterFactory.create(Type forType,
Genson genson) |
Converter<Object> |
DefaultConverters.ArrayConverterFactory.create(Type forType,
Genson genson) |
Converter<?> |
DefaultConverters.PrimitiveConverterFactory.create(Type type,
Genson genson) |
Converter<? extends Map<?,?>> |
DefaultConverters.MapConverterFactory.create(Type type,
Genson genson) |
Converter<Object> |
DefaultConverters.UntypedConverterFactory.create(Type type,
Genson genson) |
Converter<Enum<?>> |
DefaultConverters.EnumConverterFactory.create(Type type,
Genson genson) |
Converter<Calendar> |
DefaultConverters.CalendarConverterFactory.create(Type type,
Genson genson) |
Converter<?> |
CircularClassReferenceConverterFactory.create(Type type,
Genson genson) |
Converter<?> |
ChainedFactory.create(Type type,
Genson genson) |
Converter<?> |
BasicConvertersFactory.create(Type type,
Genson genson) |
protected Converter<?> |
RuntimeTypeConverter.RuntimeTypeConverterFactory.create(Type type,
Genson genson,
Converter<?> nextConverter) |
protected Converter<?> |
NullConverterFactory.create(Type type,
Genson genson,
Converter<?> nextConverter) |
protected Converter<?> |
ClassMetadataConverter.ClassMetadataConverterFactory.create(Type type,
Genson genson,
Converter<?> nextConverter) |
protected Converter<?> |
CircularClassReferenceConverterFactory.create(Type type,
Genson genson,
Converter<?> nextConverter) |
protected abstract Converter<?> |
ChainedFactory.create(Type type,
Genson genson,
Converter<?> nextConverter)
This method will be called by
ChainedFactory.create(Type, Genson) with nextConverter being the
converter created for current type by the next factory. |
protected Converter<?> |
BeanViewConverter.BeanViewConverterFactory.create(Type type,
Genson genson,
Converter<?> nextConverter) |
Converter<E> |
DefaultConverters.CollectionConverter.getElementConverter() |
Modifier and Type | Method and Description |
---|---|
Factory<? extends Converter<?>> |
ChainedFactory.next() |
Modifier and Type | Method and Description |
---|---|
protected Converter<?> |
RuntimeTypeConverter.RuntimeTypeConverterFactory.create(Type type,
Genson genson,
Converter<?> nextConverter) |
protected Converter<?> |
NullConverterFactory.create(Type type,
Genson genson,
Converter<?> nextConverter) |
protected Converter<?> |
ClassMetadataConverter.ClassMetadataConverterFactory.create(Type type,
Genson genson,
Converter<?> nextConverter) |
protected Converter<?> |
CircularClassReferenceConverterFactory.create(Type type,
Genson genson,
Converter<?> nextConverter) |
protected abstract Converter<?> |
ChainedFactory.create(Type type,
Genson genson,
Converter<?> nextConverter)
This method will be called by
ChainedFactory.create(Type, Genson) with nextConverter being the
converter created for current type by the next factory. |
protected Converter<?> |
BeanViewConverter.BeanViewConverterFactory.create(Type type,
Genson genson,
Converter<?> nextConverter) |
Constructor and Description |
---|
ChainedFactory(Factory<Converter<?>> next) |
Modifier and Type | Class and Description |
---|---|
class |
OptionalConverter<T> |
Constructor and Description |
---|
OptionalConverter(Converter<T> valueConverter) |
Modifier and Type | Class and Description |
---|---|
class |
BaseLocalConverter<T extends org.joda.time.base.BaseLocal> |
class |
BaseReadableInstantConverter<T extends org.joda.time.ReadableInstant> |
class |
DurationConverter |
class |
IntervalConverter |
class |
PeriodConverter |
Modifier and Type | Method and Description |
---|---|
Converter<org.joda.time.Interval> |
IntervalConverter.ConverterFactory.create(Type type,
Genson genson) |
Constructor and Description |
---|
IntervalConverter(Converter<org.joda.time.DateTime> dateTimeConverter) |
Modifier and Type | Class and Description |
---|---|
class |
JSR353Bundle.JsonValueConverter |
Modifier and Type | Class and Description |
---|---|
class |
BeanDescriptor<T>
BeanDescriptors are used to serialize/deserialize objects based on their fields, methods and
constructors.
|
Modifier and Type | Method and Description |
---|---|
Converter<?> |
AbstractBeanDescriptorProvider.ContextualFactoryDecorator.create(Type type,
Genson genson) |
Constructor and Description |
---|
ContextualFactoryDecorator(Factory<Converter<?>> delegatedFactory) |
Copyright © 2019. All rights reserved.