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
- Alphabetic
- By Inheritance
- SealedTrait
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new SealedTrait(typeName: TypeName, subtypesArray: Array[Subtype[Typeclass, Type]], annotationsArray: Array[Any], typeAnnotationsArray: Array[Any])
- new SealedTrait(typeName: TypeName, subtypesArray: Array[Subtype[Typeclass, Type]], annotationsArray: Array[Any], inheritedAnnotationsArray: Array[Any], typeAnnotationsArray: Array[Any])
- 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
- typeAnnotationsArray
an array of instantiated type annotations applied to this case class
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def annotations: Seq[Any]
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. - final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def inheritedAnnotations: Seq[Any]
a sequence of objects representing all of the annotations on the parent traits
a sequence of objects representing all of the annotations on the parent traits
For efficiency, this sequence is implemented by an
Array
, but upcast to a scala.collection.Seq to hide the mutable collection API. - final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def split[Return](value: Type)(handle: (Subtype[Typeclass, Type]) => Return): Return
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 parametervalue
- def subtypes: Seq[Subtype[Typeclass, Type]]
a sequence of all the subtypes of this sealed trait
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- SealedTrait → AnyRef → Any
- def typeAnnotations: Seq[Any]
a sequence of objects representing all of the type annotations on the topmost trait
a sequence of objects representing all of the type 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. - val typeName: TypeName
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated