scala

pickling

package pickling

Visibility
  1. Public
  2. All

Type Members

  1. abstract class AutoRegister[T] extends Pickler[T] with Unpickler[T]

  2. trait CurrentMirrorMacro extends Macro

  3. trait DPickler[T] extends AnyRef

    A dynamic pickler for type T.

    A dynamic pickler for type T. Its pickle method takes an object-to-be-pickled of static type T, and pickles it to an instance of PBuilder. In the process the object is turned into some external representation like a byte array. The particular external representation (the "pickle format") is defined by the builder.

    In contrast to static picklers (instances of type Pickler[T]), a dynamic pickler of type DPickler[T] pickles any object of type T.

    Annotations
    @implicitNotFound( ... )
  4. final class EndOfStreamException extends RuntimeException

    Exception thrown when a stream ends unexpectedly during unpickling.

  5. trait FastTypeTag[T] extends Equals

    A "tag" denoting information about a runtime type.

    A "tag" denoting information about a runtime type. This tag is meant to be extermely efficient for simple runtime checks, avoiding a full reflection overhead, while also *allowing* full runtime checks.

    Notes:

    1. Currently the equals method does "stringy" comparison of types. For a full equality comparison, you'll need to fully reify the Type (tpe). 2. Calling mirror or tpe may cause runtime reflection to be used.

    T

  6. trait FastTypeTagMacros extends Macro

  7. trait Generated extends AnyRef

  8. trait Hintable extends AnyRef

  9. case class Hints(tag: FastTypeTag[_] = null, knownSize: Int = 1, isStaticallyElidedType: Boolean = false, isDynamicallyElidedType: Boolean = false, oid: Int = 1, pinned: Boolean = false) extends Product with Serializable

  10. sealed trait IsStaticOnly extends AnyRef

  11. abstract class Macro extends RichTypes

  12. trait OpenSumUnpicklerMacro extends Macro with UnpicklerMacros with FastTypeTagMacros

  13. trait Ops extends AnyRef

  14. trait Output[T] extends AnyRef

  15. trait PBuilder extends Hintable

    A builder of pickled content.

    A builder of pickled content. This is a mutable API, intended to be called in certain specific ways.

    Here are a few static rules that all picklers must follow when using this interface.

    1. You will be given a type hint before any beginEntry() call. 2. There will be one endEntry() for every beginEntry() call. 3. There will be one endCollection() for every beginCollection() call. 4. Every beginCollection()/endCollection() pair will be inside a beginEntry()/endEntry() pair. 5. Every putElement() call must happen within a beginCollection()/endCollection() block. 6. Every putField() call must happen within a beginEntry()/endEntry() block. 7. There is no guarantee that putElement() will be called within a beginCollectoin()/endCollection() pair. i.e. we can write empty collections. 8. There is no guarantee that putField will be called within a beginEntry()/endEntry() pair. i.e. if we don't put any fields, this means the entry was for a "primitive" type, at least what The pickling library considers primitives. 9. The order of putField calls in any pickler will be the exact same ordering when unpickling, if the format is compatible.

    Here is a list of all types the auto-generated Picklers considers "primitives" and must be directly supported by any PBuilder:

    • Nothing
    • Null
    • Unit
    • Byte
    • Char
    • String
    • Short
    • Int
    • Long
    • Float
    • Double
    • Ref (for circular object graphs)
    • ArrayByte
    • ArrayShort
    • ArrayChar
    • ArrayInt
    • ArrayLong
    • ArrayBoolean
    • ArrayFloat
    • ArrayDouble
  16. trait PReader extends Hintable

    A reader of pickled content.

    A reader of pickled content. This is a mutable API, intended to be called in certain specific ways.

    Here are a few static rules that all picklers must follow when using this interface.

    1. There must be a hintTag() before any beginEntry() call. 2. There will be one endEntry() for every beginEntry() call. 3. There will be one endCollection() for every beginCollection() call. 4. Every beginCollection()/endCollection() pair will be inside a beginEntry()/endEntry() pair. 5. Every readLength() call will be immediately after a beginCollection() call. 6. Every readElement() call must happen within a beginCollection()/endCollection() block, and after a readLength(). 7. Every readField() call must happen within a beginEntry()/endEntry() block. 8. If readLength() returns 0, there will be no called to readElement(). 9. readField() will only be called where atObject would return true 10. readPrimitive will only be called when atPrimitive would return true 11. The order of readField calls in any pickler will be the exact same ordering when pickling,

    Here is a list of all types the auto-generated Picklers considers "primitives" and must be directly supported by any PReader "readPrimitive" operation:

    • Nothing
    • Null
    • Unit
    • Byte
    • Char
    • String
    • Short
    • Int
    • Long
    • Float
    • Double
    • Ref (for circular object graphs)
    • ArrayByte
    • ArrayShort
    • ArrayChar
    • ArrayInt
    • ArrayLong
    • ArrayBoolean
    • ArrayFloat
    • ArrayDouble
  17. trait Pickle extends AnyRef

  18. trait PickleFormat extends AnyRef

  19. trait PickleMacros extends Macro with TypeAnalysis

  20. final case class PickleOps[T](picklee: T) extends Product with Serializable

    Appends the pickle/pickleTo/pickleInto operations onto any type, assuming implicits picklers are available.

  21. trait PickleTools extends AnyRef

  22. trait Pickler[T] extends AnyRef

    A static pickler for type T.

    A static pickler for type T. Its pickle method takes an object-to-be-pickled of static type T, and pickles it to an instance of PBuilder. In the process the object is turned into some external representation like a byte array. The particular external representation (the "pickle format") is defined by the builder.

    This pickler requires that the dynamic type of the object-to-be-pickled is equal to the erasure of its static type T.

    Annotations
    @implicitNotFound( ... )
  23. trait PicklerMacros extends Macro with PickleMacros with FastTypeTagMacros

  24. trait PicklerUnpicklerMacros extends Macro with PicklerMacros with UnpicklerMacros with FastTypeTagMacros

  25. final case class PicklingException(message: String, cause: Option[Throwable] = None) extends RuntimeException with Product with Serializable

    Exception thrown when the pickling or unpickling process fails.

    Exception thrown when the pickling or unpickling process fails.

    message

    error message

    cause

    exception causing the pickling exception if any

  26. trait RichTypes extends AnyRef

  27. abstract class ShareAnalyzer[U <: Universe] extends RichTypes

  28. class StringOutput extends Output[String]

  29. class Tools[C <: Context] extends AnyRef

  30. trait TypeAnalysis extends Macro

  31. trait UnpickleMacros extends Macro with TypeAnalysis

  32. final case class UnpickleOps(thePickle: Pickle) extends Product with Serializable

  33. trait Unpickler[T] extends AnyRef

    This is something which knowns how to reconstitute/materialize a type out of a pickle reader.

    This is something which knowns how to reconstitute/materialize a type out of a pickle reader.

    Annotations
    @implicitNotFound( ... )
  34. trait UnpicklerMacros extends Macro with UnpickleMacros with FastTypeTagMacros

  35. class directSubclasses extends Annotation with Annotation with ClassfileAnnotation

Value Members

  1. object Compat

  2. object DPickler

  3. object Defaults extends Ops with AllPicklers

    Import scala.pickling.Defaults._ to introduce all picklers and ops.

  4. object FastTypeTag

  5. object Pickler

  6. object PicklerUnpickler

  7. object Tools

  8. object Unpickler

  9. package binary

  10. object functions

  11. package internal

  12. package io

  13. package ir

  14. package json

  15. package pickler

  16. package refs

  17. package runtime

  18. package shareEverything

  19. package shareNothing

  20. package static

  21. package util

Ungrouped