io.altoo.serialization.kryo.scala.ScalaVersionSerializers.scala Maven / Gradle / Ivy
package io.altoo.serialization.kryo.scala
import com.esotericsoftware.kryo.kryo5.Kryo
import io.altoo.serialization.kryo.scala.serializer.{ScalaCollectionSerializer, ScalaEnumNameSerializer, ScalaImmutableMapSerializer}
private[kryo] object ScalaVersionSerializers {
def mapAndSet(kryo: Kryo): Unit = {
kryo.addDefaultSerializer(classOf[scala.collection.MapFactory[_root_.scala.collection.Map]], classOf[ScalaImmutableMapSerializer])
}
def iterable(kryo: Kryo): Unit = {
kryo.addDefaultSerializer(classOf[scala.collection.Iterable[?]], classOf[ScalaCollectionSerializer])
}
def enums(kryo: Kryo): Unit = {
kryo.addDefaultSerializer(classOf[scala.runtime.EnumValue], classOf[ScalaEnumNameSerializer[scala.runtime.EnumValue]])
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy