Class

magnolia

SealedTrait

Related Doc: package magnolia

Permalink

final class SealedTrait[Typeclass[_], Type] extends Serializable

represents a sealed trait and the context required to construct a new typeclass instance corresponding to it

Instances of SealedTrait provide access to all of the component subtypes of the sealed trait which form a coproduct, and to the fully-qualified name of the sealed trait.

Typeclass

type constructor for the typeclass being derived

Type

generic type of this parameter

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SealedTrait
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SealedTrait(typeName: TypeName, subtypesArray: Array[Subtype[Typeclass, Type]], annotationsArray: Array[Any])

    Permalink

    typeName

    the name of the sealed trait

    subtypesArray

    an array of Subtype instances for each subtype in the sealed trait

    annotationsArray

    an array of instantiated annotations applied to this case class

Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def annotations: Seq[Any]

    Permalink

    a sequence of objects representing all of the annotations on the topmost trait

    a sequence of objects representing all of the annotations on the topmost trait

    For efficiency, this sequence is implemented by an Array, but upcast to a scala.collection.Seq to hide the mutable collection API.

  5. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def dispatch[Return](value: Type)(handle: (Subtype[Typeclass, Type]) ⇒ Return): Return

    Permalink

    convenience method for delegating typeclass application to the typeclass corresponding to the subtype of the sealed trait which matches the type of the value

    convenience method for delegating typeclass application to the typeclass corresponding to the subtype of the sealed trait which matches the type of the value

    Return

    the return type of the lambda, which should be inferred

    value

    the instance of the generic type whose value should be used to match on a particular subtype of the sealed trait

    handle

    lambda for applying the value to the typeclass for the particular subtype which matches

    returns

    the result of applying the handle lambda to subtype of the sealed trait which matches the parameter value

  8. final def eq(arg0: AnyRef): Boolean

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  17. def subtypes: Seq[Subtype[Typeclass, Type]]

    Permalink

    a sequence of all the subtypes of this sealed trait

  18. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    SealedTrait → AnyRef → Any
  20. val typeName: TypeName

    Permalink

    the name of the sealed trait

  21. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped