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
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
SealedTrait(typeName: TypeName, subtypesArray: Array[Subtype[Typeclass, Type]], annotationsArray: 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
-
final
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( ... ) @native()
-
def
dispatch[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
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
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()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
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
-
final
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(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()