Newtype

zio.blocks.codegen.ir.Newtype
final case class Newtype(name: String, wrappedType: TypeRef, annotations: List[Annotation] = ..., doc: Option[String] = ...) extends TypeDefinition

Represents a newtype wrapper in the IR.

Value parameters

annotations

Annotations on the newtype (defaults to empty list)

doc

Optional documentation (defaults to None)

name

The name of the newtype

wrappedType

The underlying type being wrapped

Attributes

Example
val userId = Newtype("UserId", wrappedType = TypeRef.Long)
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