| OVERVIEW | PACKAGE | CONSTR | FIELDS | METHODS | FRAMES NO FRAMES | INHERITED |
trait TypeHints
extends
ScalaObject
Example:
class DateTime(val time: Long)
val hints = new ShortTypeHints(classOf[DateTime] :: Nil) {
override def serialize: PartialFunction[Any, JObject] = {
case t: DateTime => JObject(JField("t", JInt(t.time)) :: Nil)
}
override def deserialize: PartialFunction[(String, JObject), Any] = {
case ("DateTime", JObject(JField("t", JInt(t)) :: Nil)) => new DateTime(t.longValue)
}
}
implicit val formats = DefaultFormats.withHints(hints)
| components.. |
def components
|
List[TypeHints] | |
| hints.. |
abstract val hints
|
List[Class[Any]] | |
| serialize.. |
def serialize
|
PartialFunction[Any, JObject] |
| !=.. |
final def !=(arg0 : Object)
|
Boolean | AnyRef |
| !=.. |
final def !=(arg0 : Any)
|
Boolean | Any |
| +.. |
def +(hints : TypeHints)
Adds the specified type hints to this type hints
|
TypeHints | |
| ==.. |
final def ==(arg0 : Any)
|
Boolean | Any |
| ==.. |
final def ==(arg0 : Object)
|
Boolean | AnyRef |
| asInstanceOf.. |
final def asInstanceOf[T0]
|
T0 | Any |
| classFor.. |
abstract def classFor(hint : String)
Return type for given hint
|
Option[Class[Any]] | |
| clone.. |
protected def clone
|
Object | AnyRef |
| containsHint_?.. |
def containsHint_?(clazz : Class[Any])
|
Boolean | |
| deserialize.. |
def deserialize
|
PartialFunction[(String, JObject), Any] | |
| eq.. |
final def eq(arg0 : Object)
|
Boolean | AnyRef |
| equals.. |
def equals(arg0 : Any)
|
Boolean | AnyRef |
| finalize.. |
protected def finalize
|
Unit | AnyRef |
| getClass.. |
final def getClass
|
Class[Any] | AnyRef |
| hashCode.. |
def hashCode
|
Int | AnyRef |
| hintFor.. |
abstract def hintFor(clazz : Class[Any])
Return hint for given type
|
String | |
| isInstanceOf.. |
final def isInstanceOf[T0]
|
Boolean | Any |
| ne.. |
final def ne(arg0 : Object)
|
Boolean | AnyRef |
| notify.. |
final def notify
|
Unit | AnyRef |
| notifyAll.. |
final def notifyAll
|
Unit | AnyRef |
| synchronized.. |
final def synchronized[T0](arg0 : T0)
|
T0 | AnyRef |
| toString.. |
def toString
|
String | AnyRef |
| wait.. |
final def wait(arg0 : Long, arg1 : Int)
|
Unit | AnyRef |
| wait.. |
final def wait
|
Unit | AnyRef |
| wait.. |
final def wait(arg0 : Long)
|
Unit | AnyRef |
| OVERVIEW | PACKAGE | CONSTR | FIELDS | METHODS | FRAMES NO FRAMES | INHERITED |