org.ensime.sexp.formats

FamilyFormats

trait FamilyFormats extends LowPriorityFamilyFormats

Automatically create product/coproduct marshallers (i.e. families of sealed traits and case classes/objects) for s-express.

This uses s-expression data as the underlying format, as opposed to alists. Alists are arguably a better wire format because they allow for arbitrarily complex keys, but we're applying the Principle of Least Power.

Based on spray-json-shapeless, with the same caveats.

Self Type
FamilyFormats with StandardFormats
Linear Supertypes
LowPriorityFamilyFormats, SexpFormatHints, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. FamilyFormats
  2. LowPriorityFamilyFormats
  3. SexpFormatHints
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. class BasicProductHint[T] extends ProductHint[T]

    Definition Classes
    SexpFormatHints
  2. trait CoproductHint[T] extends AnyRef

    Definition Classes
    SexpFormatHints
  3. class FlatCoproductHint[T] extends CoproductHint[T]

    Product types are disambiguated by a (:key value ...).

  4. class NestedCoproductHint[T] extends CoproductHint[T]

    Product types are disambiguated by an extra layer containing a single key which is the name of the type of product contained in the value.

  5. trait ProductHint[T] extends AnyRef

    Definition Classes
    SexpFormatHints
  6. sealed trait SexpNilBehaviour extends AnyRef

    Sometimes the wire format needs to match an existing format and SexpNil behaviour needs to be customised.

  7. abstract class WrappedSexpFormat[Wrapped, SubRepr] extends AnyRef

    a SexpFormat[HList] or SexpFormat[Coproduct] would not retain the type information for the full generic that it is serialising.

    a SexpFormat[HList] or SexpFormat[Coproduct] would not retain the type information for the full generic that it is serialising. This allows us to pass the wrapped type, achieving: 1) custom CoproductHints on a per-trait level 2) configurable null behaviour on a per product level 3) clearer error messages.

    This is intentionally not an SexpFormat to avoid ambiguous implicit errors, even though it implements its interface.

    Definition Classes
    LowPriorityFamilyFormats

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. object AlwaysSexpNil extends SexpNilBehaviour with Product with Serializable

    All values serialising to SexpNil will be included in the wire format.

  7. object NeverSexpNil extends SexpNilBehaviour with Product with Serializable

    No values serialising to SexpNil will be included in the wire format.

  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. implicit def cNilFormat[Wrapped]: (FamilyFormats.this)#WrappedSexpFormat[Wrapped, CNil]

    Definition Classes
    LowPriorityFamilyFormats
  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. implicit def coproductFormat[Wrapped, Name <: Symbol, Instance, Remaining <: Coproduct](implicit th: (FamilyFormats.this)#CoproductHint[Wrapped], key: Aux[Name], sfh: Lazy[SexpFormat[Instance]], sft: (FamilyFormats.this)#WrappedSexpFormat[Wrapped, Remaining]): (FamilyFormats.this)#WrappedSexpFormat[Wrapped, :+:[FieldType[Name, Instance], Remaining]]

    Definition Classes
    LowPriorityFamilyFormats
  12. implicit def coproductHint[T](implicit arg0: Typeable[T]): (FamilyFormats.this)#CoproductHint[T]

    Definition Classes
    SexpFormatHints
  13. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  15. implicit def familyFormat[T, Repr](implicit gen: Aux[T, Repr], sg: Cached[Strict[(FamilyFormats.this)#WrappedSexpFormat[T, Repr]]], tpe: Typeable[T]): SexpFormat[T]

    Format for LabelledGenerics that uses the HList or Coproduct marshaller above.

    Format for LabelledGenerics that uses the HList or Coproduct marshaller above.

    Blah.Aux[T, Repr] is a trick to work around scala compiler constraints. We'd really like to have only one type parameter (T) implicit list g: LabelledGeneric[T], f: Cached[Strict[SexpFormat[T.Repr]]] but that's not possible.

    Definition Classes
    LowPriorityFamilyFormats
  16. def finalize(): Unit

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

    Definition Classes
    AnyRef → Any
  18. implicit def hListFormat[Wrapped, Key <: Symbol, Value, Remaining <: HList](implicit ph: (FamilyFormats.this)#ProductHint[Wrapped], key: Aux[Key], sfh: Lazy[SexpFormat[Value]], sft: (FamilyFormats.this)#WrappedSexpFormat[Wrapped, Remaining]): (FamilyFormats.this)#WrappedSexpFormat[Wrapped, ::[FieldType[Key, Value], Remaining]]

    Definition Classes
    LowPriorityFamilyFormats
  19. implicit def hNilFormat[Wrapped]: (FamilyFormats.this)#WrappedSexpFormat[Wrapped, HNil]

    Definition Classes
    LowPriorityFamilyFormats
  20. def hashCode(): Int

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

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

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

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

    Definition Classes
    AnyRef
  25. implicit def productHint[T]: (FamilyFormats.this)#ProductHint[T]

    Definition Classes
    SexpFormatHints
  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  27. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from LowPriorityFamilyFormats

Inherited from SexpFormatHints

Inherited from AnyRef

Inherited from Any

Ungrouped