scala.tools.nsc.io

Pickler

abstract class Pickler[T] extends AnyRef

An abstract class for writing and reading Scala objects to and from a legible representation. The presesentation follows the following grammar:

 Pickled = `true' | `false' | `null' | NumericLit | StringLit |
           Labelled | Pickled `,' Pickled
 Labelled = StringLit `(' Pickled? `)'

All ...Lit classes are as in JSON. @see scala.tools.nsc.io.Lexer

Subclasses of Pickler each can write and read individual classes of values.

Source
Pickler.scala
Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Pickler
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Pickler()

Abstract Value Members

  1. abstract def pickle(wr: Writer, x: T): Unit

    Writes value in pickled form

    Writes value in pickled form

    wr

    the writer to which pickled form is written

    x

    the value to write

  2. abstract def unpickle(rd: Lexer): Unpickled[T]

    Reads value from pickled form.

    Reads value from pickled form.

    rd

    the lexer from which lexemes are read

    returns

    An UnpickleSuccess value if the current input corresponds to the kind of value that is unpickled by the current subclass of Pickler, an UnpickleFailure value otherwise.

    Exceptions thrown
    `Lexer.MalformedInput`

    if input is invalid, or if an Unpickle

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def asClass[U <: T](c: Class[U]): CondPickler[T]

    A conditional pickler handling values of some Scala class.

    A conditional pickler handling values of some Scala class. It adds the class name as a label to the representation of the current pickler and

    c

    the class of values handled by this pickler.

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  9. def cond(p: (Any) ⇒ Boolean): CondPickler[T]

    A conditional pickler obtained from the current pickler.

  10. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  13. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  16. def labelled(label: String): Pickler[T]

    A pickler that adds a label to the current pickler, using the representation label ( <current pickler> )

  17. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  20. def orNull(implicit fromNull: <:<[Null, T]): Pickler[T]

    A pickler obtained from the current pickler by also admitting null as a handled value, represented as the token null.

    A pickler obtained from the current pickler by also admitting null as a handled value, represented as the token null.

    fromNull

    an implicit evidence parameter ensuring that the type of values handled by this pickler contains null.

  21. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  22. def toString(): String

    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  24. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  25. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  26. def wrapped[U](in: (T) ⇒ U)(out: (U) ⇒ T): Pickler[U]

    A pickler obtained from the current pickler by a pair of transformer functions

    A pickler obtained from the current pickler by a pair of transformer functions

    in

    the function that maps values handled by the current pickler to values handled by the wrapped pickler.

    out

    the function that maps values handled by the wrapped pickler to values handled by the current pickler.

  27. def ~[U](that: ⇒ Pickler[U]): Pickler[~[T, U]]

    A pickler representing a ~-pair of values as two consecutive pickled strings, separated by a comma.

    A pickler representing a ~-pair of values as two consecutive pickled strings, separated by a comma.

    that

    the second pickler which together with the current pickler makes up the pair this ~ that to be pickled.

Inherited from AnyRef

Inherited from Any