Class GensonBundle
- java.lang.Object
-
- com.oracle.coherence.io.json.genson.ext.GensonBundle
-
- Direct Known Subclasses:
CoherenceBundleProvider.CoherenceBundle,GensonServiceBundle,JacksonBundle,JavaDateTimeBundle,JsonbBundle,JSR353Bundle
public abstract class GensonBundle extends Object
Bundles allow to package all kind of Genson customizations into a single module and register them all together. Extensions are registered using Genson.Builder.Genson genson = new GensonBuilder().with(new SuperCoolExtension()).create();
Extension configuration is mixed with user custom configuration (no way to distinguish them), however user custom config. has preference over bundle configuration. This means that you can override bundle configuration with custom one. Important note, bundles must be registered after any other configuration. This part of the API is still in beta, it could change in the future in order to make it more powerful.- Author:
- Eugen Cepoi
-
-
Constructor Summary
Constructors Constructor Description GensonBundle()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidconfigure(GensonBuilder builder)This method does not provide any guarantee to when it is called: before user config, during, or after.BeanDescriptorProvidercreateBeanDescriptorProvider(AbstractBeanDescriptorProvider.ContextualConverterFactory contextualConverterFactory, BeanPropertyFactory propertyFactory, BeanMutatorAccessorResolver propertyResolver, PropertyNameResolver nameResolver, GensonBuilder builder)
-
-
-
Method Detail
-
configure
public abstract void configure(GensonBuilder builder)
This method does not provide any guarantee to when it is called: before user config, during, or after. Thus it should not rely on accessor methods from GensonBuilder they might not reflect the final configuration. Use the builder to register your components.
-
createBeanDescriptorProvider
public BeanDescriptorProvider createBeanDescriptorProvider(AbstractBeanDescriptorProvider.ContextualConverterFactory contextualConverterFactory, BeanPropertyFactory propertyFactory, BeanMutatorAccessorResolver propertyResolver, PropertyNameResolver nameResolver, GensonBuilder builder)
-
-