Top Fields Constructors Methods
com.fasterxml.jackson.jr.retrofit2

public Class JacksonJrConverter<T>

extends Factory
Class Inheritance
Imports
java.lang.annotation.Annotation, java.lang.reflect.Type, com.fasterxml.jackson.jr.ob.JSON, okhttp3.RequestBody, okhttp3.ResponseBody, retrofit2.Converter, .Retrofit

Field Summary

Modifier and TypeField and Description
protected final JSON
protected final Class<T>

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public Converter<?, okhttp3.RequestBody>
requestBodyConverter(Type type, Annotation[] parameterAnnotations, Annotation[] methodAnnotations, Retrofit retrofit)

Overrides retrofit2.Converter.Factory.requestBodyConverter.

Returns a Converter for converting type to an HTTP request body, or null if type cannot be handled by this factory.

public Converter<okhttp3.ResponseBody, ?>
responseBodyConverter(Type type, Annotation[] annotations, Retrofit retrofit)

Overrides retrofit2.Converter.Factory.responseBodyConverter.

Returns a Converter for converting an HTTP response body to type, or null if type cannot be handled by this factory.

Inherited from retrofit2.Converter.Factory:
getParameterUpperBoundgetRawTypestringConverter

Field Detail

_jrback to summary
protected final JSON _jr
_typeback to summary
protected final Class<T> _type

Constructor Detail

JacksonJrConverterback to summary
public JacksonJrConverter(Class<T> tClass)
JacksonJrConverterback to summary
public JacksonJrConverter(JSON jr, Class<T> t)

Method Detail

requestBodyConverterback to summary
public Converter<?, okhttp3.RequestBody> requestBodyConverter(Type type, Annotation[] parameterAnnotations, Annotation[] methodAnnotations, Retrofit retrofit)

Overrides retrofit2.Converter.Factory.requestBodyConverter.

Doc from retrofit2.Converter.Factory.requestBodyConverter.

Returns a Converter for converting type to an HTTP request body, or null if type cannot be handled by this factory. This is used to create converters for types specified by @Body, @Part, and @PartMap values.

Annotations
@Override
responseBodyConverterback to summary
public Converter<okhttp3.ResponseBody, ?> responseBodyConverter(Type type, Annotation[] annotations, Retrofit retrofit)

Overrides retrofit2.Converter.Factory.responseBodyConverter.

Doc from retrofit2.Converter.Factory.responseBodyConverter.

Returns a Converter for converting an HTTP response body to type, or null if type cannot be handled by this factory. This is used to create converters for response types such as SimpleResponse from a Call<SimpleResponse> declaration.

Annotations
@Override