Package ch.raffael.meldioc.library.codec
Class GsonObjectCodec.Factory
- java.lang.Object
-
- ch.raffael.meldioc.library.codec.GsonObjectCodec.Factory
-
- All Implemented Interfaces:
ObjectCodecFactory
- Enclosing class:
- GsonObjectCodec<T>
public static class GsonObjectCodec.Factory extends java.lang.Object implements ObjectCodecFactory
-
-
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 Deprecated Methods Modifier and Type Method Description booleancanDecode(ch.raffael.meldioc.library.codec.ContentType contentType)booleancanDecodeAs(java.lang.Class<?> type)booleancanEncode(java.lang.Class<?> type)booleancanEncodeAs(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)booleanisInvalidInput(java.lang.Throwable exception)Deprecated, for removal: This API element is subject to removal in a future version.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ch.raffael.meldioc.library.codec.ObjectCodecFactory
decoder, decoder, encoder, encoder
-
-
-
-
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:
encoderin interfaceObjectCodecFactory
-
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:
decoderin interfaceObjectCodecFactory
-
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)
-
canEncode
public boolean canEncode(java.lang.Class<?> type)
- Specified by:
canEncodein interfaceObjectCodecFactory
-
canEncodeAs
public boolean canEncodeAs(ch.raffael.meldioc.library.codec.ContentType contentType)
- Specified by:
canEncodeAsin interfaceObjectCodecFactory
-
canDecode
public boolean canDecode(ch.raffael.meldioc.library.codec.ContentType contentType)
- Specified by:
canDecodein interfaceObjectCodecFactory
-
canDecodeAs
public boolean canDecodeAs(java.lang.Class<?> type)
- Specified by:
canDecodeAsin interfaceObjectCodecFactory
-
isInvalidInput
@Deprecated(forRemoval=true) public boolean isInvalidInput(java.lang.Throwable exception)
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
isInvalidInputin interfaceObjectCodecFactory
-
-