scala.tools.nsc.io

CondPickler

abstract class CondPickler[T] extends Pickler[T]

A subclass of Pickler can indicate whether a particular value can be pickled by instances of this class.

Source
Pickler.scala
Linear Supertypes
Pickler[T], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. CondPickler
  2. Pickler
  3. AnyRef
  4. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CondPickler(canPickle: (Any) ⇒ Boolean)

    canPickle

    The predicate that indicates whether a given value can be pickled by instances of this class.

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

    Definition Classes
    Pickler
  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.

    Definition Classes
    Pickler
    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.

    Definition Classes
    Pickler
  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. val canPickle: (Any) ⇒ Boolean

    The predicate that indicates whether a given value can be pickled by instances of this class.

  9. def clone(): AnyRef

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

    A conditional pickler obtained from the current pickler.

    A conditional pickler obtained from the current pickler.

    Definition Classes
    Pickler
  11. final def eq(arg0: AnyRef): Boolean

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

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

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

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

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

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

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

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

    Definition Classes
    Pickler
  18. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  21. 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.

    Definition Classes
    Pickler
  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  23. def toString(): String

    Definition Classes
    AnyRef → Any
  24. def tryPickle(wr: Writer, x: Any): Boolean

    Pickles given value x if possible, as indicated by canPickle(x).

  25. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()
  28. 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.

    Definition Classes
    Pickler
  29. def |[V >: T, U <: V](that: ⇒ CondPickler[U]): CondPickler[V]

    A pickler obtained from this pickler and an alternative pickler.

    A pickler obtained from this pickler and an alternative pickler. To pickle a value, this pickler is tried first. If it cannot handle the object (as indicated by its canPickle test), then the alternative pickler is tried. To unpickle a value, this unpickler is tried first. If it cannot read the input (as indicated by a UnpickleFailure result), then the alternative pickler is tried.

    that

    The alternative pickler.

  30. 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.

    Definition Classes
    Pickler

Inherited from Pickler[T]

Inherited from AnyRef

Inherited from Any