Class GuavaOptionalConverterFactory

java.lang.Object
retrofit2.Converter.Factory
retrofit.converter.guava.GuavaOptionalConverterFactory

public final class GuavaOptionalConverterFactory
extends retrofit2.Converter.Factory
A converter for Optional<T> which delegates to another converter to deserialize T and then wraps it into Optional.
  • Method Summary

    Modifier and Type Method Description
    static GuavaOptionalConverterFactory create()  
    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, requestBodyConverter, stringConverter

    Methods inherited from class java.lang.Object

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

    • create

      public static GuavaOptionalConverterFactory create()
    • 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