All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.cerner.beadledom.client.jackson.ObjectMapperClientFeatureModule Maven / Gradle / Ivy

The newest version!
package com.cerner.beadledom.client.jackson;

import com.cerner.beadledom.guice.BindingAnnotations;
import com.cerner.beadledom.jackson.JacksonModule;
import com.google.inject.AbstractModule;
import java.lang.annotation.Annotation;

/**
 * A guice modules for a default ObjectMapper for beadledom clients.
 *
 * 

To use this module install it using the {@link ObjectMapperClientFeatureModule#with(Class)} * method providing your own client binding annotation. This binding annotation is needed to * namespace this feature to the client matching the binding annotation. * *

Installs: *

    *
  • {@link JacksonModule}
  • *
  • {@link AnnotatedJacksonModule}
  • *
* * @author John Leacox * @since 1.0 * @deprecated As of 3.6, use Retrofit (https://github.com/square/retrofit) instead. */ @Deprecated public class ObjectMapperClientFeatureModule extends AbstractModule { private final Class clientBindingAnnotation; private ObjectMapperClientFeatureModule(Class clientBindingAnnotation) { this.clientBindingAnnotation = clientBindingAnnotation; } /** * Creates a new instance of {@code ObjectMapperClientFeatureModule} for the specified binding * annotation. */ public static ObjectMapperClientFeatureModule with( Class clientBindingAnnotation) { BindingAnnotations.checkIsBindingAnnotation(clientBindingAnnotation); return new ObjectMapperClientFeatureModule(clientBindingAnnotation); } @Override protected void configure() { install(AnnotatedJacksonModule.with(clientBindingAnnotation)); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy