Class ScalarsConverterFactory

java.lang.Object
retrofit2.Converter.Factory
retrofit2.converter.scalars.ScalarsConverterFactory

public final class ScalarsConverterFactory
extends retrofit2.Converter.Factory
A converter for strings and both primitives and their boxed types to text/plain bodies.
  • Method Summary

    Modifier and Type Method Description
    static ScalarsConverterFactory create()  
    retrofit2.Converter<?,​okhttp3.RequestBody> requestBodyConverter​(java.lang.reflect.Type type, java.lang.annotation.Annotation[] parameterAnnotations, java.lang.annotation.Annotation[] methodAnnotations, retrofit2.Retrofit retrofit)  
    retrofit2.Converter<okhttp3.ResponseBody,​?> responseBodyConverter​(java.lang.reflect.Type type, java.lang.annotation.Annotation[] annotations, retrofit2.Retrofit retrofit)  

    Methods inherited from class retrofit2.Converter.Factory

    getParameterUpperBound, getRawType, stringConverter

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • create

      public static ScalarsConverterFactory create()
    • requestBodyConverter

      @Nullable public retrofit2.Converter<?,​okhttp3.RequestBody> requestBodyConverter​(java.lang.reflect.Type type, java.lang.annotation.Annotation[] parameterAnnotations, java.lang.annotation.Annotation[] methodAnnotations, retrofit2.Retrofit retrofit)
      Overrides:
      requestBodyConverter in class retrofit2.Converter.Factory
    • responseBodyConverter

      @Nullable public retrofit2.Converter<okhttp3.ResponseBody,​?> responseBodyConverter​(java.lang.reflect.Type type, java.lang.annotation.Annotation[] annotations, retrofit2.Retrofit retrofit)
      Overrides:
      responseBodyConverter in class retrofit2.Converter.Factory