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 Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
Source
Product.scala
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product
Source
Product.scala