diff options
author | Julien Tournay <julient@spotify.com> | 2018-06-01 16:34:21 +0200 |
---|---|---|
committer | Julien Tournay <julient@spotify.com> | 2018-06-01 16:34:21 +0200 |
commit | 42d05080f2b6a8034ec92da5119d0b82a7cc0503 (patch) | |
tree | 26fc172cfd66cc9934ff789f61ddfe1b7f3497a9 /core | |
parent | fb514c8045df9eb36064aef05e50595287e9d9fa (diff) | |
download | magnolia-42d05080f2b6a8034ec92da5119d0b82a7cc0503.tar.gz magnolia-42d05080f2b6a8034ec92da5119d0b82a7cc0503.tar.bz2 magnolia-42d05080f2b6a8034ec92da5119d0b82a7cc0503.zip |
Make instances Serializable
Diffstat (limited to 'core')
-rw-r--r-- | core/shared/src/main/scala/interface.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/shared/src/main/scala/interface.scala b/core/shared/src/main/scala/interface.scala index 6eea9f1..af4fb51 100644 --- a/core/shared/src/main/scala/interface.scala +++ b/core/shared/src/main/scala/interface.scala @@ -21,7 +21,7 @@ import scala.annotation.tailrec * * @tparam Typeclass type constructor for the typeclass being derived * @tparam Type generic type of this parameter */ -trait Subtype[Typeclass[_], Type] { +trait Subtype[Typeclass[_], Type] extends Serializable { /** the type of subtype */ type SType <: Type @@ -47,7 +47,7 @@ trait Subtype[Typeclass[_], Type] { * * @tparam Typeclass type constructor for the typeclass being derived * @tparam Type generic type of this parameter */ -trait Param[Typeclass[_], Type] { +trait Param[Typeclass[_], Type] extends Serializable { /** the type of the parameter being represented * @@ -136,7 +136,7 @@ abstract class CaseClass[Typeclass[_], Type] private[magnolia] ( val isValueClass: Boolean, parametersArray: Array[Param[Typeclass, Type]], annotationsArray: Array[Any] -) { +) extends Serializable { override def toString: String = s"CaseClass(${typeName.full}, ${parameters.mkString(",")})" /** constructs a new instance of the case class type @@ -196,7 +196,7 @@ final class SealedTrait[Typeclass[_], Type]( val typeName: TypeName, subtypesArray: Array[Subtype[Typeclass, Type]], annotationsArray: Array[Any] -) { +) extends Serializable { override def toString: String = s"SealedTrait($typeName, Array[${subtypes.mkString(",")}])" |