CaseClass

magnolia1.CaseClass
See theCaseClass companion object
abstract class CaseClass[Typeclass[_], Type](val typeInfo: TypeInfo, val isObject: Boolean, val isValueClass: Boolean, val parameters: IArray[Param[Typeclass, Type]], val annotations: IArray[Any], val inheritedAnnotations: IArray[Any], val typeAnnotations: IArray[Any]) extends Serializable

In the terminology of Algebraic Data Types (ADTs), case classes are known as 'product types'.

Attributes

parameters

an array giving information about the parameters of the case class. Each Param element has a very useful CaseClass.Param.typeclass field giving the constructed typeclass for the parameter's type. Eg for a case class Foo(bar: String, baz: Int), you can obtain Typeclass[String], Typeclass[Int].

Companion:
object
Graph
Supertypes
trait Serializable
class Object
trait Matchable
class Any

Members list

Concise view

Type members

Types

type Param = Param[Typeclass, Type]

Value members

Constructors

def this(typeInfo: TypeInfo, isObject: Boolean, isValueClass: Boolean, parameters: IArray[Param[Typeclass, Type]], annotations: IArray[Any], typeAnnotations: IArray[Any])

Abstract methods

def construct[PType](makeParam: Param => PType)(using ClassTag[PType]): Type
def constructEither[Err, PType : ClassTag](makeParam: Param => Either[Err, PType]): Either[List[Err], Type]
def constructMonadic[Monad[_] : Monadic, PType : ClassTag](make: Param => Monad[PType]): Monad[Type]
def rawConstruct(fieldValues: Seq[Any]): Type

Concrete methods

def param[P](name: String, idx: Int, repeated: Boolean, cbn: CallByNeed[Typeclass[P]], defaultVal: CallByNeed[Option[P]], annotations: IArray[Any], inheritedAnns: IArray[Any], typeAnnotations: IArray[Any]): Param
def param[P](name: String, idx: Int, repeated: Boolean, cbn: CallByNeed[Typeclass[P]], defaultVal: CallByNeed[Option[P]], annotations: IArray[Any], typeAnnotations: IArray[Any]): Param
def params: IArray[Param[Typeclass, Type]]
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
Any

Concrete fields

val annotations: IArray[Any]
val inheritedAnnotations: IArray[Any]
val isObject: Boolean
val isValueClass: Boolean
val parameters: IArray[Param[Typeclass, Type]]
val typeAnnotations: IArray[Any]