Subtype

magnolia1.SealedTrait$.Subtype
class Subtype[Typeclass[_], Type, SType](val typeInfo: TypeInfo, val annotations: IArray[Any], val inheritedAnnotations: IArray[Any], val typeAnnotations: IArray[Any], val isObject: Boolean, val index: Int, callByNeed: CallByNeed[Typeclass[SType]], isType: Type => Boolean, asType: Type => SType & Type) extends PartialFunction[Type, SType & Type], Serializable

Type parameters

SType

the type of the subtype, eg 'Diamonds' or 'Clubs'

Type

the type of the Sealed Trait or Scala 3 Enum, eg 'Suit'

Attributes

Graph
Supertypes
trait Serializable
trait PartialFunction[Type, SType & Type]
trait Type => SType & Type
class Object
trait Matchable
class Any
Show all

Members list

Value members

Constructors

def this(typeInfo: TypeInfo, annotations: IArray[Any], typeAnnotations: IArray[Any], isObject: Boolean, index: Int, callByNeed: CallByNeed[Typeclass[SType]], isType: Type => Boolean, asType: Type => SType & Type)

Concrete methods

def apply(t: Type): SType & Type
def cast: PartialFunction[Type, SType & Type]
def isDefinedAt(t: Type): Boolean
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Function1 -> Any
def typeclass: Typeclass[SType & Type]

Attributes

Returns

the already-constructed typeclass instance for this subtype

Inherited methods

def andThen[C](k: PartialFunction[SType & Type, C]): PartialFunction[A, C]

Attributes

Inherited from:
PartialFunction
override def andThen[C](k: (SType & Type) => C): PartialFunction[A, C]

Attributes

Definition Classes
PartialFunction -> Function1
Inherited from:
PartialFunction
def applyOrElse[A1 <: Type, B1 >: SType & Type](x: A1, default: A1 => B1): B1

Attributes

Inherited from:
PartialFunction
def compose[R](k: PartialFunction[R, Type]): PartialFunction[R, B]

Attributes

Inherited from:
PartialFunction
def compose[A](g: A => Type): A => R

Attributes

Inherited from:
Function1
def elementWise: ElementWiseExtractor[A, B]

Attributes

Inherited from:
PartialFunction
def lift: A => Option[B]

Attributes

Inherited from:
PartialFunction
def orElse[A1 <: Type, B1 >: SType & Type](that: PartialFunction[A1, B1]): PartialFunction[A1, B1]

Attributes

Inherited from:
PartialFunction
def runWith[U](action: (SType & Type) => U): A => Boolean

Attributes

Inherited from:
PartialFunction
def unapply(a: Type): Option[B]

Attributes

Inherited from:
PartialFunction

Concrete fields

val annotations: IArray[Any]
val index: Int
val inheritedAnnotations: IArray[Any]
val isObject: Boolean
val typeAnnotations: IArray[Any]