Apply

oxygen.quoted.Apply
See theApply companion object
final class Apply(val quotes: Quotes)(val unwrap: quotes.reflect.Apply) extends Term

Attributes

Companion
object
Graph
Supertypes
trait Term
trait Statement
trait Tree
trait Model
class Object
trait Matchable
class Any
Show all

Members list

Type members

Types

override type This <: Apply

Value members

Concrete methods

def args: List[Term]

The arguments (implicitly) passed to the method

The arguments (implicitly) passed to the method

The Apply may be a partially applied method:

def f(x1: Int)(x2: Int) = ???
f(1)(2)
  • args is (2) in the Apply of f(1)(2)
  • args is (1) in the Apply of f(1)

Attributes

def fun: Term

The fun part of an (implicit) application like fun(args)

The fun part of an (implicit) application like fun(args)

It may be a partially applied method:

def f(x1: Int)(x2: Int) = ???
f(1)(2)
  • fun is f(1) in the Apply of f(1)(2)
  • fun is f in the Apply of f(1)

Attributes

override def unwrapWithin(using newQuotes: Quotes): newQuotes.reflect.Apply

Attributes

Definition Classes

Inherited methods

final def appliedTo(arg: Term, args: Term*): Term

An apply node with given arguments: tree(arg, args0, ..., argsN)

An apply node with given arguments: tree(arg, args0, ..., argsN)

Attributes

Inherited from:
Term
final def appliedTo(arg: Term): Term

A unary apply node with given argument: tree(arg)

A unary apply node with given argument: tree(arg)

Attributes

Inherited from:
Term
final def appliedToArgs(args: List[Term]): Apply

An apply node with given argument list tree(args(0), ..., args(args.length - 1))

An apply node with given argument list tree(args(0), ..., args(args.length - 1))

Attributes

Inherited from:
Term
final def appliedToArgss(argss: List[List[Term]]): Term

The current tree applied to given argument lists: tree (argss(0)) ... (argss(argss.length -1))

The current tree applied to given argument lists: tree (argss(0)) ... (argss(argss.length -1))

Attributes

Inherited from:
Term
final def appliedToNone: Apply

The current tree applied to (): tree()

The current tree applied to (): tree()

Attributes

Inherited from:
Term
final def appliedToType(targ: TypeRepr): Term

The current tree applied to given type argument: tree[targ]

The current tree applied to given type argument: tree[targ]

Attributes

Inherited from:
Term
final def appliedToTypeTrees(targs: List[TypeTree]): Term

The current tree applied to given type argument list: tree[targs(0), ..., targs(targs.length - 1)]

The current tree applied to given type argument list: tree[targs(0), ..., targs(targs.length - 1)]

Attributes

Inherited from:
Term
final def appliedToTypes(targs: List[TypeRepr]): Term

The current tree applied to given type arguments: tree[targ0, ..., targN]

The current tree applied to given type arguments: tree[targ0, ..., targN]

Attributes

Inherited from:
Term
final def asExpr: Expr[Any]

Convert this tree to an quoted.Expr[Any] if the tree is a valid expression or throws

Convert this tree to an quoted.Expr[Any] if the tree is a valid expression or throws

Attributes

Inherited from:
Tree
final def asExprOf[T](using Type[T]): Expr[T]

Convert this tree to an quoted.Expr[T] if the tree is a valid expression or throws

Convert this tree to an quoted.Expr[T] if the tree is a valid expression or throws

Attributes

Inherited from:
Tree
final def changeOwner(newOwner: Symbol): This

Changes the owner of the symbols in the tree

Changes the owner of the symbols in the tree

Attributes

Inherited from:
Tree
final override def equals(that: Any): Boolean

Compares the receiver object (this) with the argument object (that) for equivalence.

Compares the receiver object (this) with the argument object (that) for equivalence.

Any implementation of this method should be an equivalence relation:

  • It is reflexive: for any instance x of type Any, x.equals(x) should return true.
  • It is symmetric: for any instances x and y of type Any, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any instances x, y, and z of type Any if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.

If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is usually necessary to override hashCode to ensure that objects which are "equal" (o1.equals(o2) returns true) hash to the same scala.Int. (o1.hashCode.equals(o2.hashCode)).

Value parameters

that

the object to compare against this object for equality.

Attributes

Returns

true if the receiver object is equivalent to the argument; false otherwise.

Definition Classes
Model -> Any
Inherited from:
Model
final def etaExpand(owner: Symbol): Term

Converts a partially applied term into a lambda expression

Converts a partially applied term into a lambda expression

Attributes

Inherited from:
Term
final override def hashCode(): Int

Calculates a hash code value for the object.

Calculates a hash code value for the object.

The default hashing algorithm is platform dependent.

Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)) yet not be equal (o1.equals(o2) returns false). A degenerate implementation could always return 0. However, it is required that if two objects are equal (o1.equals(o2) returns true) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals method.

Attributes

Returns

the hash code value for this object.

Definition Classes
Model -> Any
Inherited from:
Model
final def isExpr: Boolean

Does this tree represent a valid expression?

Does this tree represent a valid expression?

Attributes

Inherited from:
Tree
final override def maybePos: Option[Position]

Attributes

Definition Classes
Tree -> Model
Inherited from:
Tree
final def pos: Position

Position in the source code

Position in the source code

Attributes

Inherited from:
Tree
final def removeInline: Term

Attributes

Inherited from:
Term
final def select(name: String): Select

Attributes

Inherited from:
Term
final def select(sym: Symbol): Select

A select node that selects the given symbol.

A select node that selects the given symbol.

Attributes

Inherited from:
Term
final def show(using printer: Printer[Tree]): String

Shows the tree as String

Shows the tree as String

Attributes

Inherited from:
Tree
final def showAnsiCode: String

Attributes

Inherited from:
Tree
final def showCode: String

Attributes

Inherited from:
Tree
final def showShortCode: String

Attributes

Inherited from:
Tree
final def showStructure: String

Attributes

Inherited from:
Tree
final def showWith(f: PrinterCompanion => Printer[Tree]): String

Attributes

Inherited from:
Tree
final def symbol: Symbol

Symbol of defined or referred by this tree

Symbol of defined or referred by this tree

Attributes

Inherited from:
Tree
final override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Model -> Any
Inherited from:
Model
final def tpe: TypeRepr

TypeRepr of this term

TypeRepr of this term

Attributes

Inherited from:
Term
final def underlying: Term

Replace Ident nodes references to the underlying tree that defined them. The resulting tree is useful for inspection of the definition of some bindings.

Replace Ident nodes references to the underlying tree that defined them. The resulting tree is useful for inspection of the definition of some bindings.

Warning: This tree may contain references that are out of scope and should not be used in the generated code. This method should only used to port Scala 2 that used to access their outer scope unsoundly.

Attributes

Inherited from:
Term

Replace Inlined nodes and InlineProxy references to underlying arguments. The resulting tree is useful for inspection of the value or content of a non-inline argument.

Replace Inlined nodes and InlineProxy references to underlying arguments. The resulting tree is useful for inspection of the value or content of a non-inline argument.

Warning: This tree may contain references that are out of scope and should not be used in the generated code. This method should only used to port Scala 2 that used to access their outer scope unsoundly.

Attributes

Inherited from:
Term

Concrete fields

val quotes: Quotes
val unwrap: quotes.reflect.Apply

Givens

Inherited givens

given givenQuotes: quotes.type

Attributes

Inherited from:
Tree