CaseClass
zio.blocks.codegen.ir.CaseClass
final case class CaseClass(name: String, fields: List[Field], typeParams: List[TypeParam] = ..., extendsTypes: List[TypeRef] = ..., derives: List[String] = ..., annotations: List[Annotation] = ..., companion: Option[CompanionObject] = ..., doc: Option[String] = ..., isValueClass: Boolean = ...) extends TypeDefinition
Represents a Scala case class in the IR.
Value parameters
- annotations
-
Annotations on the case class (defaults to empty list)
- companion
-
Optional companion object (defaults to None)
- derives
-
Type class derivations (defaults to empty list)
- doc
-
Optional documentation (defaults to None)
- extendsTypes
-
Types that this case class extends (defaults to empty list)
- fields
-
The fields (constructor parameters) of the case class
- name
-
The name of the case class
- typeParams
-
Type parameters for generic case classes (defaults to empty list)
Attributes
- Example
-
val person = CaseClass( "Person", fields = List( Field("name", TypeRef.String), Field("age", TypeRef.Int) ), derives = List("Schema") ) - Source
- TypeDefinition.scala
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait TypeDefinitionclass Objecttrait Matchableclass Any
Members list
In this article