dotty.tools.dotc.ast.tpd

TreeOps

Related Doc: package tpd

implicit final class TreeOps[ThisTree <: Tree] extends AnyVal

Linear Supertypes
AnyVal, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. TreeOps
  2. AnyVal
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TreeOps(tree: ThisTree)

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  2. final def ##(): Int

    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  4. def and(that: tpd.Tree)(implicit ctx: Context): tpd.Tree

    this && that, for boolean trees this, that

  5. def appliedTo(arg: tpd.Tree, args: tpd.Tree*)(implicit ctx: Context): tpd.Tree

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

  6. def appliedTo(arg: tpd.Tree)(implicit ctx: Context): tpd.Tree

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

  7. def appliedToArgs(args: List[tpd.Tree])(implicit ctx: Context): tpd.Apply

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

  8. def appliedToArgss(argss: List[List[tpd.Tree]])(implicit ctx: Context): tpd.Tree

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

  9. def appliedToNone(implicit ctx: Context): tpd.Apply

    The current tree applied to (): tree()

  10. def appliedToType(targ: Type)(implicit ctx: Context): tpd.Tree

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

  11. def appliedToTypeTrees(targs: List[tpd.Tree])(implicit ctx: Context): tpd.Tree

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

  12. def appliedToTypes(targs: List[Type])(implicit ctx: Context): tpd.Tree

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

  13. def asInstance(tp: Type)(implicit ctx: Context): tpd.Tree

    tree.asInstanceOf[tp]

  14. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  15. def becomes(rhs: tpd.Tree)(implicit ctx: Context): tpd.Tree

    The translation of tree = rhs.

    The translation of tree = rhs. This is either the tree as an assignment, to a setter call.

  16. def changeOwner(from: Symbol, to: Symbol)(implicit ctx: Context): ThisTree

    Change owner from from to to.

    Change owner from from to to. If from is a weak owner, also change its owner to to, and continue until a non-weak owner is reached.

  17. def changeOwnerAfter(from: Symbol, to: Symbol, trans: DenotTransformer)(implicit ctx: Context): ThisTree

    After phase trans, set the owner of every definition in this tree that was formerly owner by from to to.

  18. def deepFold[T](z: T)(op: (T, tpd.Tree) ⇒ T)(implicit ctx: Context): T

  19. def ensureApplied(implicit ctx: Context): tpd.Tree

    Apply to () unless tree's widened type is parameterless

  20. def ensureConforms(tp: Type)(implicit ctx: Context): tpd.Tree

    tree.asInstanceOf[tp] (or its box/unbox/cast equivalent when after erasure and value and non-value types are mixed), unless tree's type already conforms to tp.

  21. def existsSubTree(p: (tpd.Tree) ⇒ Boolean)(implicit ctx: Context): Boolean

    Is there a subtree of this tree that satisfies predicate p?

  22. def filterSubTrees(f: (tpd.Tree) ⇒ Boolean)(implicit ctx: Context): List[tpd.Tree]

    All subtrees of this tree that satisfy predicate p.

  23. def find[T](pred: (tpd.Tree) ⇒ Boolean)(implicit ctx: Context): Option[tpd.Tree]

  24. def foreachSubTree(f: (tpd.Tree) ⇒ Unit)(implicit ctx: Context): Unit

    Apply f to each subtree of this tree

  25. def getClass(): Class[_ <: AnyVal]

    Definition Classes
    AnyVal → Any
  26. def isInstance(tp: Type)(implicit ctx: Context): tpd.Tree

    tree.isInstanceOf[tp]

  27. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  28. def isInstantiation: Boolean

  29. def isValue(implicit ctx: Context): Boolean

  30. def isValueOrPattern(implicit ctx: Context): Boolean

  31. def isValueType: Boolean

  32. def or(that: tpd.Tree)(implicit ctx: Context): tpd.Tree

    this || that, for boolean trees this, that

  33. def select(sym: Symbol)(implicit ctx: Context): tpd.Select

    A select node that selects the given symbol.

    A select node that selects the given symbol. Note: Need to make sure this is in fact the symbol you would get when you select with the symbol's name, otherwise a data race may occur which would be flagged by -Yno-double-bindings.

  34. def select(tp: NamedType)(implicit ctx: Context): tpd.Select

    A select node with the given type

  35. def select(name: Name)(implicit ctx: Context): tpd.Select

    A select node with the given selector name and a computed type

  36. def selectWithSig(sym: Symbol)(implicit ctx: Context): tpd.Tree

    A select node with selector name and signature taken from sym.

    A select node with selector name and signature taken from sym. Note: Use this method instead of select(sym) if the referenced symbol might be overridden in the type of the qualifier prefix. See note on select(sym: Symbol).

  37. def selectWithSig(name: Name, sig: Signature)(implicit ctx: Context): tpd.Tree

    A select node with the given selector name and signature and a computed type

  38. def shallowFold[T](z: T)(op: (T, tpd.Tree) ⇒ T)(implicit ctx: Context): T

  39. def subst(from: List[Symbol], to: List[Symbol])(implicit ctx: Context): ThisTree

  40. def toString(): String

    Definition Classes
    Any
  41. val tree: ThisTree

  42. def wildcardToDefault(implicit ctx: Context): tpd.Tree

    If inititializer tree is _', the default value of its type, otherwise the tree itself.

Inherited from AnyVal

Inherited from Any

Ungrouped