DefDefCompanion

oxygen.quoted.companion.DefDefCompanion
final class DefDefCompanion(using quotes: Quotes)

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def apply(symbol: Symbol, rhsFn: List[List[Tree]] => Option[Term]): DefDef

Create a method definition def f[..](...) with the signature defined in the symbol.

Create a method definition def f[..](...) with the signature defined in the symbol.

The rhsFn is a function that receives references to its parameters, and should return Some containing the implementation of the method, or None if the method has no implementation. Any definition directly inside the implementation should have symbol as owner.

Use Symbol.asQuotes to create the rhs using quoted code.

See also: Tree.changeOwner

Attributes

def copy(original: Tree)(name: String, paramss: List[ParamClause], tpt: TypeTree, rhs: Option[Term]): DefDef