public final class ProtoConverterFactory extends Converter.Factory
This converter only applies for types which extend from MessageLite (or one of its
subclasses).
| Modifier and Type | Method and Description |
|---|---|
static ProtoConverterFactory |
create() |
static ProtoConverterFactory |
createWithRegistry(com.google.protobuf.ExtensionRegistryLite registry)
Create an instance which uses
registry when deserializing. |
Converter<?,okhttp3.RequestBody> |
requestBodyConverter(Type type,
Annotation[] parameterAnnotations,
Annotation[] methodAnnotations,
Retrofit retrofit)
Returns a
Converter for converting type to an HTTP request body, or null if
type cannot be handled by this factory. |
Converter<okhttp3.ResponseBody,?> |
responseBodyConverter(Type type,
Annotation[] annotations,
Retrofit retrofit)
Returns a
Converter for converting an HTTP response body to type, or null if
type cannot be handled by this factory. |
getParameterUpperBound, getRawType, stringConverterpublic static ProtoConverterFactory create()
public static ProtoConverterFactory createWithRegistry(@Nullable com.google.protobuf.ExtensionRegistryLite registry)
registry when deserializing.public Converter<okhttp3.ResponseBody,?> responseBodyConverter(Type type, Annotation[] annotations, Retrofit retrofit)
Converter.FactoryConverter 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.responseBodyConverter in class Converter.Factorypublic Converter<?,okhttp3.RequestBody> requestBodyConverter(Type type, Annotation[] parameterAnnotations, Annotation[] methodAnnotations, Retrofit retrofit)
Converter.FactoryConverter 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.requestBodyConverter in class Converter.FactoryCopyright © 2017 Square, Inc.. All rights reserved.