Field

oxygen.meta.K0.ProductGeneric.Field
final case class Field[B](idx: Int, typeRepr: TypeRepr, constructorValDef: ValDef, fieldValDef: ValDef) extends Child[Any, B, A]

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Child[Any, B, A]
trait Entity[Any, B]
class Object
trait Matchable
class Any
Show all

Members list

Type members

Types

override type SelfType[A2] = Field[A2]

Value members

Concrete methods

override def annotations(using Quotes): AnnotationsTyped[B]

Attributes

Definition Classes
def constructorDefault: Option[Expr[B]]

Will get the default value in a situation like final case class Person(first: String = "F") (returns "F"). If you use -Yretain-trees compiler flag, you might be able to retrieve the actual expr "F". This is not guaranteed, and if the actual expr itself can not be retrieved, you will get a reference to a function that returns the default value.

Will get the default value in a situation like final case class Person(first: String = "F") (returns "F"). If you use -Yretain-trees compiler flag, you might be able to retrieve the actual expr "F". This is not guaranteed, and if the actual expr itself can not be retrieved, you will get a reference to a function that returns the default value.

Attributes

def fromParent(parent: Expr[A])(using quotes: Quotes): Expr[B]

Go from a product type to its field. final case class Person(first: String, last: String)

Go from a product type to its field. final case class Person(first: String, last: String)

field.fromParent(p) -> p.first

Attributes

def fromParentExpr(using quotes: Quotes): Expr[A => B]
def fromParentTerm(parent: Term): Term
override def parentGeneric: ProductGeneric[A]

Attributes

Definition Classes
override def pos: Position

Attributes

Definition Classes

Inherited methods

final def getExpr[F[_]](expressions: Expressions[F, A])(using Quotes): Expr[F[B]]

Attributes

Inherited from:
Child
final def name: String

Attributes

Inherited from:
Entity
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
override def summonTypeClass[TC[_] : Type](using evidence$1: Type[TC], quotes: Quotes): Expr[TC[B]]

Attributes

Definition Classes
Inherited from:
Child
final def summonTypeClassOrDerive[TC[_] : Type](f: => Type[B] ?=> Expr[TC[B]])(using evidence$1: Type[TC], quotes: Quotes): Expr[TC[B]]

Attributes

Inherited from:
Entity
final def typedAs[TypeName]: SelfType[TypeName]

Meant to be used in the following manner:

Meant to be used in the following manner:

Entity in this entity could be any of Generic, ProductGeneric, SumGeneric, Field, Case

val untyped: Entity[?] = ???

type A
val typed: Entity[A] = untyped.typedAs[A]

Entity in this case could be any of Generic, ProductGeneric, SumGeneric, Field, Case

Attributes

Inherited from:
Entity

Concrete fields

override val childType: String
override val label: String
override val sym: Symbol

Givens

Inherited givens

given tpe: Type[B]

Attributes

Inherited from:
Entity