object GenCodec extends FallbackMapCodecs with TupleGenCodecs
- Alphabetic
- By Inheritance
- GenCodec
- TupleGenCodecs
- FallbackMapCodecs
- RecursiveAutoCodecs
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
final
case class
Auto
[T](codec: GenCodec[T]) extends AnyVal with Product with Serializable
Wrapper over
GenCodecwhich forces fully automatic derivation.Wrapper over
GenCodecwhich forces fully automatic derivation.If you ask for implicit value of type
GenCodec[T], the codec must be explicitly declared and imported or put into implicit scope (e.g. companion object ofT), even though it can be automatically implemented usingmaterializeormaterializeRecursively.However, if you ask for implicit value of type
GenCodec.Auto[T], the compiler will always fall back to fully automatic derivation if it cannot find already declaredGenCodec. Note that sinceGenCodec.Autowill always try to wrap already existingGenCodec(if there is one), you should never explicitly declare any instances ofGenCodec.Auto. If you need custom serialization, just write aGenCodecandGenCodec.Autowill wrap it.Whether you want to use
GenCodecorGenCodec.Autodepends on your use case.GenCodecshould be generally used when you want the programmer to always explicitly state that some type is serializable. For example, if you serialize your objects in order to put them into database, you probably want to useGenCodecand notGenCodec.Auto, because every type that has been written to database is likely to be bound by backwards compatibility constraints and cannot be freely refactored. That's why you want to always explicitly make the decision of making a type serializable. - final class Deferred [T] extends DeferredInstance[GenCodec[T]] with GenCodec[T]
- trait ErrorReportingCodec [T] extends GenCodec[T]
- trait ListCodec [T] extends NullSafeCodec[T]
- trait NullSafeCodec [T] extends GenCodec[T]
- trait ObjectCodec [T] extends NullSafeCodec[T]
- class ReadFailure extends RuntimeException
- final class SingletonCodec [T <: Singleton] extends ObjectCodec[T]
- class TransformedCodec [A, B] extends GenCodec[A]
-
implicit final
class
TraversableOps
[A] extends AnyVal
- Attributes
- protected
- class WriteFailure extends RuntimeException
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- implicit val BooleanCodec: GenCodec[Boolean]
- implicit val ByteArrayCodec: GenCodec[Array[Byte]]
- implicit val ByteCodec: GenCodec[Byte]
- implicit val CharCodec: GenCodec[Char]
- implicit val DoubleCodec: GenCodec[Double]
- implicit val FloatCodec: GenCodec[Float]
- implicit val IntCodec: GenCodec[Int]
- implicit val JBooleanCodec: GenCodec[jiop.BasicJavaInterop.JBoolean]
- implicit val JByteCodec: GenCodec[jiop.BasicJavaInterop.JByte]
- implicit val JCharacterCodec: GenCodec[jiop.BasicJavaInterop.JCharacter]
- implicit val JDateCodec: GenCodec[jiop.BasicJavaInterop.JDate]
- implicit val JDoubleCodec: GenCodec[jiop.BasicJavaInterop.JDouble]
- implicit val JFloatCodec: GenCodec[jiop.BasicJavaInterop.JFloat]
- implicit val JIntegerCodec: GenCodec[jiop.BasicJavaInterop.JInteger]
- implicit val JLongCodec: GenCodec[jiop.BasicJavaInterop.JLong]
- implicit val JShortCodec: GenCodec[jiop.BasicJavaInterop.JShort]
- implicit val LongCodec: GenCodec[Long]
- implicit val NothingAutoCodec: Auto[Nothing]
- implicit val NothingCodec: GenCodec[Nothing]
- implicit val NullCodec: GenCodec[Null]
- implicit val ShortCodec: GenCodec[Short]
- implicit val StringCodec: GenCodec[String]
- implicit val UnitCodec: GenCodec[Unit]
- implicit val VoidCodec: GenCodec[Void]
- implicit def arrayCodec[T](implicit arg0: ClassTag[T], arg1: GenCodec[T]): GenCodec[Array[T]]
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def autoRead[T](input: Input)(implicit autoCodec: Auto[T]): T
- def autoWrite[T](output: Output, value: T)(implicit autoCodec: Auto[T]): Unit
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def create[T](readFun: (Input) ⇒ T, writeFun: (Output, T) ⇒ Any): GenCodec[T]
- def createList[T >: Null](readFun: (ListInput) ⇒ T, writeFun: (ListOutput, T) ⇒ Any): ListCodec[T]
- def createNullSafe[T >: Null](readFun: (Input) ⇒ T, writeFun: (Output, T) ⇒ Any): GenCodec[T]
- def createObject[T >: Null](readFun: (ObjectInput) ⇒ T, writeFun: (ObjectOutput, T) ⇒ Any): ObjectCodec[T]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
implicit
def
fallbackJMapCodec[M[X, Y] >: Null <: jiop.BasicJavaInterop.JMap[X, Y], K, V](implicit arg0: GenCodec[K], arg1: GenCodec[V], cbf: JCanBuildFrom[(K, V), M[K, V]]): GenCodec[M[K, V] with jiop.BasicJavaInterop.JMap[K, V]]
- Definition Classes
- FallbackMapCodecs
-
implicit
def
fallbackMapCodec[M[X, Y] >: Null <: BMap[X, Y], K, V](implicit arg0: GenCodec[K], arg1: GenCodec[V], cbf: CanBuildFrom[Nothing, (K, V), M[K, V]]): GenCodec[M[K, V] with BMap[K, V]]
- Definition Classes
- FallbackMapCodecs
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- def fromKeyCodec[T](implicit keyCodec: GenKeyCodec[T]): GenCodec[T]
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- implicit def jCollectionCodec[C[X] >: Null <: jiop.BasicJavaInterop.JCollection[X], T](implicit arg0: GenCodec[T], cbf: JCanBuildFrom[T, C[T]]): GenCodec[C[T] with jiop.BasicJavaInterop.JCollection[T]]
- implicit def jMapCodec[M[X, Y] >: Null <: jiop.BasicJavaInterop.JMap[X, Y], K, V](implicit arg0: GenKeyCodec[K], arg1: GenCodec[V], cbf: JCanBuildFrom[(K, V), M[K, V]]): GenCodec[M[K, V] with jiop.BasicJavaInterop.JMap[K, V]]
- implicit def mapCodec[M[X, Y] >: Null <: BMap[X, Y], K, V](implicit arg0: GenKeyCodec[K], arg1: GenCodec[V], cbf: CanBuildFrom[Nothing, (K, V), M[K, V]]): GenCodec[M[K, V] with BMap[K, V]]
-
macro
def
materialize[T]: GenCodec[T]
Macro that automatically materializes a GenCodec for some type
T, which must be one of:Macro that automatically materializes a GenCodec for some type
T, which must be one of:- singleton type, e.g. an
object - case class whose every field type has its own GenCodec
- (generalization of case classes) class or trait whose companion object has a pair of case-class-like
applyandunapplymethods and every parameter type ofapplymethod has its own GenCodec - sealed hierarchy in which every non-abstract subclass either has its own GenCodec or it can be automatically materialized with the same mechanism
Note that automatic materialization does NOT descend into types that
Tis made of (e.g. types of case class fields must have their own codecs independently declared). If you want recursive materialization, usematerializeRecursively. - singleton type, e.g. an
-
implicit macro
def
materializeAuto[T]: Auto[T]
- Definition Classes
- RecursiveAutoCodecs
-
implicit macro
def
materializeImplicitly[T](implicit allow: AllowImplicitMacro[GenCodec[T]]): GenCodec[T]
Used internally for materialization of
GenCodec.Auto.Used internally for materialization of
GenCodec.Auto. Should not be used directly.- Definition Classes
- RecursiveAutoCodecs
-
macro
def
materializeRecursively[T]: GenCodec[T]
Like
materialize, but descends into types thatTis made of (e.g.Like
materialize, but descends into types thatTis made of (e.g. case class field types).- Definition Classes
- RecursiveAutoCodecs
- implicit def nOptCodec[T](implicit arg0: GenCodec[T]): GenCodec[NOpt[T]]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- implicit def optCodec[T](implicit arg0: GenCodec[T]): GenCodec[Opt[T]]
- implicit def optRefCodec[T >: Null](implicit arg0: GenCodec[T]): GenCodec[OptRef[T]]
- implicit def optionCodec[T](implicit arg0: GenCodec[T]): GenCodec[Option[T]]
- def read[T](input: Input)(implicit codec: GenCodec[T]): T
- implicit def seqCodec[C[X] >: Null <: BSeq[X], T](implicit arg0: GenCodec[T], cbf: CanBuildFrom[Nothing, T, C[T]]): GenCodec[C[T] with BSeq[T]]
- implicit def setCodec[C[X] >: Null <: BSet[X], T](implicit arg0: GenCodec[T], cbf: CanBuildFrom[Nothing, T, C[T]]): GenCodec[C[T] with BSet[T]]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
implicit
def
tuple10Codec[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10](implicit r1: GenCodec[T1], r2: GenCodec[T2], r3: GenCodec[T3], r4: GenCodec[T4], r5: GenCodec[T5], r6: GenCodec[T6], r7: GenCodec[T7], r8: GenCodec[T8], r9: GenCodec[T9], r10: GenCodec[T10]): GenCodec[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)]
- Definition Classes
- TupleGenCodecs
-
implicit
def
tuple11Codec[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11](implicit r1: GenCodec[T1], r2: GenCodec[T2], r3: GenCodec[T3], r4: GenCodec[T4], r5: GenCodec[T5], r6: GenCodec[T6], r7: GenCodec[T7], r8: GenCodec[T8], r9: GenCodec[T9], r10: GenCodec[T10], r11: GenCodec[T11]): GenCodec[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)]
- Definition Classes
- TupleGenCodecs
-
implicit
def
tuple12Codec[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12](implicit r1: GenCodec[T1], r2: GenCodec[T2], r3: GenCodec[T3], r4: GenCodec[T4], r5: GenCodec[T5], r6: GenCodec[T6], r7: GenCodec[T7], r8: GenCodec[T8], r9: GenCodec[T9], r10: GenCodec[T10], r11: GenCodec[T11], r12: GenCodec[T12]): GenCodec[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)]
- Definition Classes
- TupleGenCodecs
-
implicit
def
tuple13Codec[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13](implicit r1: GenCodec[T1], r2: GenCodec[T2], r3: GenCodec[T3], r4: GenCodec[T4], r5: GenCodec[T5], r6: GenCodec[T6], r7: GenCodec[T7], r8: GenCodec[T8], r9: GenCodec[T9], r10: GenCodec[T10], r11: GenCodec[T11], r12: GenCodec[T12], r13: GenCodec[T13]): GenCodec[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)]
- Definition Classes
- TupleGenCodecs
-
implicit
def
tuple14Codec[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14](implicit r1: GenCodec[T1], r2: GenCodec[T2], r3: GenCodec[T3], r4: GenCodec[T4], r5: GenCodec[T5], r6: GenCodec[T6], r7: GenCodec[T7], r8: GenCodec[T8], r9: GenCodec[T9], r10: GenCodec[T10], r11: GenCodec[T11], r12: GenCodec[T12], r13: GenCodec[T13], r14: GenCodec[T14]): GenCodec[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)]
- Definition Classes
- TupleGenCodecs
-
implicit
def
tuple15Codec[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15](implicit r1: GenCodec[T1], r2: GenCodec[T2], r3: GenCodec[T3], r4: GenCodec[T4], r5: GenCodec[T5], r6: GenCodec[T6], r7: GenCodec[T7], r8: GenCodec[T8], r9: GenCodec[T9], r10: GenCodec[T10], r11: GenCodec[T11], r12: GenCodec[T12], r13: GenCodec[T13], r14: GenCodec[T14], r15: GenCodec[T15]): GenCodec[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)]
- Definition Classes
- TupleGenCodecs
-
implicit
def
tuple16Codec[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16](implicit r1: GenCodec[T1], r2: GenCodec[T2], r3: GenCodec[T3], r4: GenCodec[T4], r5: GenCodec[T5], r6: GenCodec[T6], r7: GenCodec[T7], r8: GenCodec[T8], r9: GenCodec[T9], r10: GenCodec[T10], r11: GenCodec[T11], r12: GenCodec[T12], r13: GenCodec[T13], r14: GenCodec[T14], r15: GenCodec[T15], r16: GenCodec[T16]): GenCodec[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16)]
- Definition Classes
- TupleGenCodecs
-
implicit
def
tuple17Codec[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17](implicit r1: GenCodec[T1], r2: GenCodec[T2], r3: GenCodec[T3], r4: GenCodec[T4], r5: GenCodec[T5], r6: GenCodec[T6], r7: GenCodec[T7], r8: GenCodec[T8], r9: GenCodec[T9], r10: GenCodec[T10], r11: GenCodec[T11], r12: GenCodec[T12], r13: GenCodec[T13], r14: GenCodec[T14], r15: GenCodec[T15], r16: GenCodec[T16], r17: GenCodec[T17]): GenCodec[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17)]
- Definition Classes
- TupleGenCodecs
-
implicit
def
tuple18Codec[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18](implicit r1: GenCodec[T1], r2: GenCodec[T2], r3: GenCodec[T3], r4: GenCodec[T4], r5: GenCodec[T5], r6: GenCodec[T6], r7: GenCodec[T7], r8: GenCodec[T8], r9: GenCodec[T9], r10: GenCodec[T10], r11: GenCodec[T11], r12: GenCodec[T12], r13: GenCodec[T13], r14: GenCodec[T14], r15: GenCodec[T15], r16: GenCodec[T16], r17: GenCodec[T17], r18: GenCodec[T18]): GenCodec[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18)]
- Definition Classes
- TupleGenCodecs
-
implicit
def
tuple19Codec[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19](implicit r1: GenCodec[T1], r2: GenCodec[T2], r3: GenCodec[T3], r4: GenCodec[T4], r5: GenCodec[T5], r6: GenCodec[T6], r7: GenCodec[T7], r8: GenCodec[T8], r9: GenCodec[T9], r10: GenCodec[T10], r11: GenCodec[T11], r12: GenCodec[T12], r13: GenCodec[T13], r14: GenCodec[T14], r15: GenCodec[T15], r16: GenCodec[T16], r17: GenCodec[T17], r18: GenCodec[T18], r19: GenCodec[T19]): GenCodec[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19)]
- Definition Classes
- TupleGenCodecs
-
implicit
def
tuple20Codec[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20](implicit r1: GenCodec[T1], r2: GenCodec[T2], r3: GenCodec[T3], r4: GenCodec[T4], r5: GenCodec[T5], r6: GenCodec[T6], r7: GenCodec[T7], r8: GenCodec[T8], r9: GenCodec[T9], r10: GenCodec[T10], r11: GenCodec[T11], r12: GenCodec[T12], r13: GenCodec[T13], r14: GenCodec[T14], r15: GenCodec[T15], r16: GenCodec[T16], r17: GenCodec[T17], r18: GenCodec[T18], r19: GenCodec[T19], r20: GenCodec[T20]): GenCodec[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20)]
- Definition Classes
- TupleGenCodecs
-
implicit
def
tuple21Codec[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21](implicit r1: GenCodec[T1], r2: GenCodec[T2], r3: GenCodec[T3], r4: GenCodec[T4], r5: GenCodec[T5], r6: GenCodec[T6], r7: GenCodec[T7], r8: GenCodec[T8], r9: GenCodec[T9], r10: GenCodec[T10], r11: GenCodec[T11], r12: GenCodec[T12], r13: GenCodec[T13], r14: GenCodec[T14], r15: GenCodec[T15], r16: GenCodec[T16], r17: GenCodec[T17], r18: GenCodec[T18], r19: GenCodec[T19], r20: GenCodec[T20], r21: GenCodec[T21]): GenCodec[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21)]
- Definition Classes
- TupleGenCodecs
-
implicit
def
tuple22Codec[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22](implicit r1: GenCodec[T1], r2: GenCodec[T2], r3: GenCodec[T3], r4: GenCodec[T4], r5: GenCodec[T5], r6: GenCodec[T6], r7: GenCodec[T7], r8: GenCodec[T8], r9: GenCodec[T9], r10: GenCodec[T10], r11: GenCodec[T11], r12: GenCodec[T12], r13: GenCodec[T13], r14: GenCodec[T14], r15: GenCodec[T15], r16: GenCodec[T16], r17: GenCodec[T17], r18: GenCodec[T18], r19: GenCodec[T19], r20: GenCodec[T20], r21: GenCodec[T21], r22: GenCodec[T22]): GenCodec[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22)]
- Definition Classes
- TupleGenCodecs
-
implicit
def
tuple2Codec[T1, T2](implicit r1: GenCodec[T1], r2: GenCodec[T2]): GenCodec[(T1, T2)]
- Definition Classes
- TupleGenCodecs
-
implicit
def
tuple3Codec[T1, T2, T3](implicit r1: GenCodec[T1], r2: GenCodec[T2], r3: GenCodec[T3]): GenCodec[(T1, T2, T3)]
- Definition Classes
- TupleGenCodecs
-
implicit
def
tuple4Codec[T1, T2, T3, T4](implicit r1: GenCodec[T1], r2: GenCodec[T2], r3: GenCodec[T3], r4: GenCodec[T4]): GenCodec[(T1, T2, T3, T4)]
- Definition Classes
- TupleGenCodecs
-
implicit
def
tuple5Codec[T1, T2, T3, T4, T5](implicit r1: GenCodec[T1], r2: GenCodec[T2], r3: GenCodec[T3], r4: GenCodec[T4], r5: GenCodec[T5]): GenCodec[(T1, T2, T3, T4, T5)]
- Definition Classes
- TupleGenCodecs
-
implicit
def
tuple6Codec[T1, T2, T3, T4, T5, T6](implicit r1: GenCodec[T1], r2: GenCodec[T2], r3: GenCodec[T3], r4: GenCodec[T4], r5: GenCodec[T5], r6: GenCodec[T6]): GenCodec[(T1, T2, T3, T4, T5, T6)]
- Definition Classes
- TupleGenCodecs
-
implicit
def
tuple7Codec[T1, T2, T3, T4, T5, T6, T7](implicit r1: GenCodec[T1], r2: GenCodec[T2], r3: GenCodec[T3], r4: GenCodec[T4], r5: GenCodec[T5], r6: GenCodec[T6], r7: GenCodec[T7]): GenCodec[(T1, T2, T3, T4, T5, T6, T7)]
- Definition Classes
- TupleGenCodecs
-
implicit
def
tuple8Codec[T1, T2, T3, T4, T5, T6, T7, T8](implicit r1: GenCodec[T1], r2: GenCodec[T2], r3: GenCodec[T3], r4: GenCodec[T4], r5: GenCodec[T5], r6: GenCodec[T6], r7: GenCodec[T7], r8: GenCodec[T8]): GenCodec[(T1, T2, T3, T4, T5, T6, T7, T8)]
- Definition Classes
- TupleGenCodecs
-
implicit
def
tuple9Codec[T1, T2, T3, T4, T5, T6, T7, T8, T9](implicit r1: GenCodec[T1], r2: GenCodec[T2], r3: GenCodec[T3], r4: GenCodec[T4], r5: GenCodec[T5], r6: GenCodec[T6], r7: GenCodec[T7], r8: GenCodec[T8], r9: GenCodec[T9]): GenCodec[(T1, T2, T3, T4, T5, T6, T7, T8, T9)]
- Definition Classes
- TupleGenCodecs
- def underlyingCodec(codec: GenCodec[_]): GenCodec[_]
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def write[T](output: Output, value: T)(implicit codec: GenCodec[T]): Unit