Class GsonObjectCodec.Factory

    • Constructor Summary

      Constructors 
      Constructor Description
      Factory​(com.google.gson.Gson gson, int bufferSize, io.vavr.control.Option<java.nio.charset.Charset> defaultCharset)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean canDecode​(ch.raffael.meldioc.library.codec.ContentType contentType)  
      boolean canDecodeAs​(java.lang.Class<?> type)  
      boolean canEncode​(java.lang.Class<?> type)  
      boolean canEncodeAs​(ch.raffael.meldioc.library.codec.ContentType contentType)  
      <T> io.vavr.control.Option<ObjectCodec<T>> codec​(io.vavr.control.Option<ch.raffael.meldioc.library.codec.ContentType> contentType, java.lang.Class<T> type)  
      <T> io.vavr.control.Option<ObjectDecoder<T>> decoder​(io.vavr.control.Option<ch.raffael.meldioc.library.codec.ContentType> contentType, java.lang.Class<T> type)  
      <T> io.vavr.control.Option<ObjectEncoder<T>> encoder​(java.lang.Class<T> type, io.vavr.control.Option<ch.raffael.meldioc.library.codec.ContentType> contentType)  
      boolean isInvalidInput​(java.lang.Throwable exception)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Factory

        public Factory​(com.google.gson.Gson gson,
                       int bufferSize,
                       io.vavr.control.Option<java.nio.charset.Charset> defaultCharset)
    • Method Detail

      • encoder

        public <T> io.vavr.control.Option<ObjectEncoder<T>> encoder​(java.lang.Class<T> type,
                                                                    io.vavr.control.Option<ch.raffael.meldioc.library.codec.ContentType> contentType)
        Specified by:
        encoder in interface ObjectCodecFactory
      • decoder

        public <T> io.vavr.control.Option<ObjectDecoder<T>> decoder​(io.vavr.control.Option<ch.raffael.meldioc.library.codec.ContentType> contentType,
                                                                    java.lang.Class<T> type)
        Specified by:
        decoder in interface ObjectCodecFactory
      • codec

        public <T> io.vavr.control.Option<ObjectCodec<T>> codec​(io.vavr.control.Option<ch.raffael.meldioc.library.codec.ContentType> contentType,
                                                                java.lang.Class<T> type)
      • canEncodeAs

        public boolean canEncodeAs​(ch.raffael.meldioc.library.codec.ContentType contentType)
        Specified by:
        canEncodeAs in interface ObjectCodecFactory
      • canDecode

        public boolean canDecode​(ch.raffael.meldioc.library.codec.ContentType contentType)
        Specified by:
        canDecode in interface ObjectCodecFactory