ObjectDef
zio.blocks.codegen.ir.ObjectDef
final case class ObjectDef(name: String, members: List[ObjectMember] = ..., extendsTypes: List[TypeRef] = ..., isCaseObject: Boolean = ..., annotations: List[Annotation] = ..., doc: Option[String] = ...) extends TypeDefinition
Represents a Scala object definition in the IR.
Value parameters
- annotations
-
Annotations on the object (defaults to empty list)
- doc
-
Optional documentation (defaults to None)
- extendsTypes
-
Types that this object extends (defaults to empty list)
- isCaseObject
-
Whether this is a case object (defaults to false)
- members
-
The members of the object (defaults to empty list)
- name
-
The name of the object
Attributes
- Example
-
val utils = ObjectDef( "Utils", members = List( ObjectMember.ValMember("MaxRetries", TypeRef.Int, "3") ) ) - Source
- TypeDefinition.scala
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait TypeDefinitionclass Objecttrait Matchableclass Any
Members list
In this article