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
- Alphabetic
- By Inheritance
- CondPickler
- Pickler
- AnyRef
- Any
- by TildeDecorator
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
Abstract Value Members
- 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
- 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 ofPickler
, anUnpickleFailure
value otherwise.
- Definition Classes
- Pickler
- Exceptions thrown
Lexer.MalformedInput
if input is invalid, or if anUnpickle
Concrete Value Members
- 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
- val canPickle: (Any) => Boolean
- def cond(p: (Any) => Boolean): CondPickler[T]
A conditional pickler obtained from the current pickler.
A conditional pickler obtained from the current pickler.
- p
the condition to test to find out whether pickler can handle some Scala value.
- Definition Classes
- Pickler
- 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> )
- label
the string to be added as a label.
- Definition Classes
- Pickler
- def tryPickle(wr: Writer, x: Any): Boolean
Pickles given value
x
if possible, as indicated bycanPickle(x)
. - 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
- 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 aUnpickleFailure
result), then the alternative pickler is tried.- V
The handled type of the returned pickler.
- U
The handled type of the alternative pickler.
- that
The alternative pickler.
- 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
Shadowed Implicit Value Members
- def ~[T](y: T): ~[CondPickler[T], T]
Infix method that forms a
~
-pair.Infix method that forms a
~
-pair.- Implicit
- This member is added by an implicit conversion from CondPickler[T] toTildeDecorator[CondPickler[T]] performed by method TildeDecorator in scala.tools.nsc.interactive.Pickler.
- Shadowing
- This implicitly inherited member is shadowed by one or more members in this class.
To access this member you can use a type ascription:(condPickler: TildeDecorator[CondPickler[T]]).~(y)
- Definition Classes
- TildeDecorator
The Scala compiler and reflection APIs.