Class

emblem.emblematic.traversors.sync

JsonToEmblematicTranslator

Related Doc: package sync

Permalink

class JsonToEmblematicTranslator extends Traversor

translates json4s AST into emblematic types.

expects JSON for non top-level emblems with a single property to inline those emblems. does not expect inlined unions.

Source
JsonToEmblematicTranslator.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. JsonToEmblematicTranslator
  2. Traversor
  3. AnyRef
  4. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new JsonToEmblematicTranslator()

    Permalink

Type Members

  1. trait CustomTraversor[A] extends AnyRef

    Permalink

    a custom traversor over type A

    a custom traversor over type A

    Definition Classes
    Traversor
  2. type CustomTraversorPool = TypeKeyMap[Any, CustomTraversor]

    Permalink

    a TypeKeyMap for custom traversors

    Definition Classes
    Traversor
  3. type PropInput[A, B] = (EmblemProp[A, B], TraverseInput[B])

    Permalink

    an input for traversing an EmblemProp

    an input for traversing an EmblemProp

    Attributes
    protected
    Definition Classes
    Traversor
  4. type PropResult[A, B] = (EmblemProp[A, B], TraverseResult[B])

    Permalink

    an output for traversing an EmblemProp

    an output for traversing an EmblemProp

    Attributes
    protected
    Definition Classes
    Traversor
  5. type TraverseInput[A] = WrappedInput

    Permalink

    the input to a traversal step over type A

    the input to a traversal step over type A

    Definition Classes
    JsonToEmblematicTranslatorTraversor
  6. type TraverseResult[A] = A

    Permalink

    the output to a traversal step over type A

    the output to a traversal step over type A

    Definition Classes
    JsonToEmblematicTranslatorTraversor
  7. case class WrappedInput(value: JValue, isUnionOrTopLevel: Boolean) extends Product with Serializable

    Permalink

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from JsonToEmblematicTranslator to any2stringadd[JsonToEmblematicTranslator] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (JsonToEmblematicTranslator, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from JsonToEmblematicTranslator to ArrowAssoc[JsonToEmblematicTranslator] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. object CustomTraversorPool

    Permalink
    Definition Classes
    Traversor
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def constituentTypeKey[A](union: Union[A], input: WrappedInput)(implicit arg0: TypeKey[A]): TypeKey[_ <: A]

    Permalink

    decodes and returns a type key for the union constituent from the input

    decodes and returns a type key for the union constituent from the input

    A

    the type of the Union object to traverse

    union

    the union

    input

    the input to decode

    returns

    the constituent type key

    Attributes
    protected
    Definition Classes
    JsonToEmblematicTranslatorTraversor
  10. val customTraversors: CustomTraversorPool

    Permalink

    the custom traversors to use in the recursive traversal

    the custom traversors to use in the recursive traversal

    Attributes
    protected
    Definition Classes
    Traversor
  11. val emblematic: Emblematic

    Permalink

    the emblematic types to use in the recursive traversal

    the emblematic types to use in the recursive traversal

    Attributes
    protected
    Definition Classes
    Traversor
  12. def ensuring(cond: (JsonToEmblematicTranslator) ⇒ Boolean, msg: ⇒ Any): JsonToEmblematicTranslator

    Permalink
    Implicit information
    This member is added by an implicit conversion from JsonToEmblematicTranslator to Ensuring[JsonToEmblematicTranslator] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: (JsonToEmblematicTranslator) ⇒ Boolean): JsonToEmblematicTranslator

    Permalink
    Implicit information
    This member is added by an implicit conversion from JsonToEmblematicTranslator to Ensuring[JsonToEmblematicTranslator] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. def ensuring(cond: Boolean, msg: ⇒ Any): JsonToEmblematicTranslator

    Permalink
    Implicit information
    This member is added by an implicit conversion from JsonToEmblematicTranslator to Ensuring[JsonToEmblematicTranslator] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. def ensuring(cond: Boolean): JsonToEmblematicTranslator

    Permalink
    Implicit information
    This member is added by an implicit conversion from JsonToEmblematicTranslator to Ensuring[JsonToEmblematicTranslator] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  16. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from JsonToEmblematicTranslator to StringFormat[JsonToEmblematicTranslator] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  20. final def getClass(): Class[_]

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

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

    Permalink
    Definition Classes
    Any
  23. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. def stageEmblemProps[A](emblem: Emblem[A], input: WrappedInput)(implicit arg0: TypeKey[A]): Iterable[PropInput[A, _]]

    Permalink

    stages the traversal of an Emblem's props

    stages the traversal of an Emblem's props

    A

    the type of the object to traverse

    emblem

    the emblem being traversed

    input

    the input to the emblem traversal

    returns

    an iteratable of inputs for the emblem props

    Attributes
    protected
    Definition Classes
    JsonToEmblematicTranslatorTraversor
  27. def stageListElements[A](input: WrappedInput)(implicit arg0: TypeKey[A]): Iterable[WrappedInput]

    Permalink

    stages the traversal of an list's elements

    stages the traversal of an list's elements

    A

    the type of the list elements

    input

    the input to traversing the list

    returns

    a iterable of inputs for the list's elements. an empty iterable is returned to avoid traversal into the list.

    Attributes
    protected
    Definition Classes
    JsonToEmblematicTranslatorTraversor
  28. def stageOptionValue[A](input: WrappedInput)(implicit arg0: TypeKey[A]): Iterable[WrappedInput]

    Permalink

    stages the traversal of an option's value

    stages the traversal of an option's value

    A

    the type of the option's value

    input

    the input to traversing the option

    returns

    an iterable of 0 or 1 inputs of the option's value. an empty iterable is returned to avoid traversal into the option.

    Attributes
    protected
    Definition Classes
    JsonToEmblematicTranslatorTraversor
  29. def stageSetElements[A](input: WrappedInput)(implicit arg0: TypeKey[A]): Iterable[WrappedInput]

    Permalink

    stages the traversal of an set's elements

    stages the traversal of an set's elements

    A

    the type of the set elements

    input

    the input to traversing the set

    returns

    a iterable of inputs for the set's elements. an empty iterable is returned to avoid traversal into the set.

    Attributes
    protected
    Definition Classes
    JsonToEmblematicTranslatorTraversor
  30. def stageUnion[A, B <: A](union: Union[A], input: WrappedInput)(implicit arg0: TypeKey[A], arg1: TypeKey[B]): Iterable[WrappedInput]

    Permalink

    stages the traversal of a Union

    stages the traversal of a Union

    A

    the type of the union

    input

    the input to traversing the union

    returns

    an iterable of 0 or 1 inputs of the union value. an empty iterable is returned to avoid traversal into the union.

    Attributes
    protected
    Definition Classes
    JsonToEmblematicTranslatorTraversor
  31. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  32. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  33. def translate[A](input: JValue)(implicit arg0: TypeKey[A]): A

    Permalink

    translates json4s AST into emblematic types

  34. def traverse[A](input: TraverseInput[A])(implicit arg0: TypeKey[A]): TraverseResult[A]

    Permalink

    traverses an object of any supported type.

    traverses an object of any supported type.

    A

    the type of the object to traverse

    Definition Classes
    Traversor
    Exceptions thrown

    emblem.exceptions.CouldNotTraverseException when an unsupported type is encountered during the traversal

  35. def traverseBoolean(input: WrappedInput): Boolean

    Permalink

    traverses a boolean

    traverses a boolean

    Attributes
    protected
    Definition Classes
    JsonToEmblematicTranslatorTraversor
  36. def traverseChar(input: WrappedInput): Char

    Permalink

    traverses a char

    traverses a char

    Attributes
    protected
    Definition Classes
    JsonToEmblematicTranslatorTraversor
  37. def traverseDateTime(input: WrappedInput): DateTime

    Permalink

    traverses a date-time

    traverses a date-time

    Attributes
    protected
    Definition Classes
    JsonToEmblematicTranslatorTraversor
  38. def traverseDouble(input: WrappedInput): Double

    Permalink

    traverses a double

    traverses a double

    Attributes
    protected
    Definition Classes
    JsonToEmblematicTranslatorTraversor
  39. def traverseFloat(input: WrappedInput): Float

    Permalink

    traverses a float

    traverses a float

    Attributes
    protected
    Definition Classes
    JsonToEmblematicTranslatorTraversor
  40. def traverseInt(input: WrappedInput): Int

    Permalink

    traverses an int

    traverses an int

    Attributes
    protected
    Definition Classes
    JsonToEmblematicTranslatorTraversor
  41. def traverseLong(input: WrappedInput): Long

    Permalink

    traverses a long

    traverses a long

    Attributes
    protected
    Definition Classes
    JsonToEmblematicTranslatorTraversor
  42. def traverseString(input: WrappedInput): String

    Permalink

    traverses a string

    traverses a string

    Attributes
    protected
    Definition Classes
    JsonToEmblematicTranslatorTraversor
  43. def unstageEmblemProps[A](emblem: Emblem[A], input: WrappedInput, result: Iterable[PropResult[A, _]])(implicit arg0: TypeKey[A]): A

    Permalink

    unstages the traversal of an Emblem's props

    unstages the traversal of an Emblem's props

    A

    the type of the object to traverse

    emblem

    the emblem being traversed

    input

    the input to the emblem traversal

    returns

    the output for the emblem

    Attributes
    protected
    Definition Classes
    JsonToEmblematicTranslatorTraversor
  44. def unstageListElements[A](input: WrappedInput, result: Iterable[A])(implicit arg0: TypeKey[A]): List[A]

    Permalink

    unstages the traversal of a list's elements

    unstages the traversal of a list's elements

    A

    the type of the list elements

    input

    the input to traversing the list

    result

    an iterable of results for the list's elements. an empty iterable indicates that traversal into the list has been avoided

    returns

    the result of travering the list

    Attributes
    protected
    Definition Classes
    JsonToEmblematicTranslatorTraversor
  45. def unstageOptionValue[A](input: WrappedInput, result: Iterable[A])(implicit arg0: TypeKey[A]): Option[A]

    Permalink

    unstages the traversal of an option's value

    unstages the traversal of an option's value

    A

    the type of the option's value

    input

    the input to traversing the option

    result

    an iterable of 0 or 1 results of the option's value. an empty iterable indicates that traversal into the option has been avoided

    Attributes
    protected
    Definition Classes
    JsonToEmblematicTranslatorTraversor
  46. def unstageSetElements[A](input: WrappedInput, result: Iterable[A])(implicit arg0: TypeKey[A]): Set[A]

    Permalink

    unstages the traversal of an set's elements

    unstages the traversal of an set's elements

    A

    the type of the set elements

    input

    the input to traversing the set

    result

    an iterable of results for the set's elements. an empty iterable indicates that traversal into the set has been avoided

    returns

    the result of traversing the set

    Attributes
    protected
    Definition Classes
    JsonToEmblematicTranslatorTraversor
  47. def unstageUnion[A, B <: A](union: Union[A], input: WrappedInput, result: Iterable[B])(implicit arg0: TypeKey[A], arg1: TypeKey[B]): A

    Permalink

    unstages the traversal of a Union

    unstages the traversal of a Union

    A

    the type of the union

    input

    the input to traversing the union

    result

    an iterable of 0 or 1 results of the union's value. an empty iterable indicates that traversal into the union has been avoided.

    returns

    the result of traversing the union

    Attributes
    protected
    Definition Classes
    JsonToEmblematicTranslatorTraversor
  48. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. def [B](y: B): (JsonToEmblematicTranslator, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from JsonToEmblematicTranslator to ArrowAssoc[JsonToEmblematicTranslator] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from Traversor

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from JsonToEmblematicTranslator to any2stringadd[JsonToEmblematicTranslator]

Inherited by implicit conversion StringFormat from JsonToEmblematicTranslator to StringFormat[JsonToEmblematicTranslator]

Inherited by implicit conversion Ensuring from JsonToEmblematicTranslator to Ensuring[JsonToEmblematicTranslator]

Inherited by implicit conversion ArrowAssoc from JsonToEmblematicTranslator to ArrowAssoc[JsonToEmblematicTranslator]

Ungrouped