object TreeOps

Stateless helper functions on scala.meta.Tree.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TreeOps
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def assertValidParens(open: Token, close: Token): Unit
  6. def childOf(tok: Token, tree: Tree, owners: Map[TokenHash, Tree]): Boolean
  7. final def childOf(child: Tree, tree: Tree): Boolean
    Annotations
    @tailrec()
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  9. def defBody(tree: Tree): Option[Tree]
  10. def defDefReturnType(tree: Tree): Option[Type]
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  13. def existsChild(f: (Tree) => Boolean)(tree: Tree): Boolean

    Returns true tree has a child for which f(child) is true.

  14. def extractStatementsIfAny(tree: Tree): Seq[Tree]
  15. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  16. def findSiblingGuard(generator: Generator): Option[Guard]
  17. def getApplyArgs(formatToken: FormatToken, leftOwner: Tree): (Tree, Seq[Tree])
  18. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. def getDequeueSpots(tree: Tree): Set[TokenHash]
  20. def getEnumStatements(enums: Seq[Enumerator]): Seq[Enumerator]
  21. def getMatchingParentheses(tokens: Tokens): Map[TokenHash, Token]

    Finds matching parens [({})].

    Finds matching parens [({})].

    Contains lookup keys in both directions, opening [({ and closing })].

  22. def getOwners(tree: Tree): Map[TokenHash, Tree]

    Creates lookup table from token offset to its closest scala.meta tree.

  23. final def getSelectChain(child: Tree, accum: Vector[Select]): Vector[Select]
    Annotations
    @tailrec()
  24. final def getSelectChain(select: Select): Vector[Select]
  25. def getStatementStarts(tree: Tree): Map[TokenHash, Tree]
  26. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  27. final def isApplyInfix(op: Ident, owner: Tree): Boolean
  28. def isBinPackDefnSite(tree: Tree): Boolean
  29. def isBlockFunction(fun: Function): Boolean
  30. def isCallSite(tree: Tree): Boolean
  31. def isChainApplyParent(parent: Tree, child: Tree): Boolean
  32. def isDefDef(tree: Tree): Boolean
  33. def isDefnOrCallSite(tree: Tree): Boolean
  34. def isDefnSite(tree: Tree): Boolean

    Returns true if the Tree is a definition site

    Returns true if the Tree is a definition site

    Currently, this includes everything from classes and defs to type applications

  35. def isDefnSiteWithParams(tree: Tree): Boolean

    Returns true if the Tree is a class, trait or def

    Returns true if the Tree is a class, trait or def

    For classes this includes primary and secondary Ctors.

  36. def isFirstOrLastToken(token: Token, owner: Tree): Boolean
  37. def isImporterOrDefnOrCallSite(tree: Tree): Boolean
  38. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  39. def isModPrivateProtected(tree: Tree): Boolean
  40. def isProcedureSyntax(defn: Def): Boolean
  41. def isSuperfluousParenthesis(open: Token, owner: Tree): Boolean

    Returns true if open is "unnecessary".

    Returns true if open is "unnecessary".

    An opening parenthesis is unnecessary if without it and its closing parenthesis can be removed without changing the AST. For example:

    (a(1)) will parse into the same tree as a(1).

  42. def isTopLevel(tree: Tree): Boolean
  43. final def isTopLevelInfixApplication(child: Tree): Boolean
    Annotations
    @tailrec()
  44. def isTuple(tree: Tree): Boolean
  45. def isTypeVariant(tree: Tree): Boolean
  46. def isXmlBrace(owner: Tree): Boolean
  47. final def lastLambda(first: Function): Function
    Annotations
    @tailrec()
  48. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  49. def nestedApplies(tree: Tree): Int

    How many parents of tree are Term.Apply?

  50. def nestedSelect(tree: Tree): Int
  51. def noSpaceBeforeOpeningParen(tree: Tree): Boolean
  52. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  53. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  54. final def parents(tree: Tree, accum: Seq[Tree] = Seq.empty[Tree]): Seq[Tree]
    Annotations
    @tailrec()
  55. val splitApplyIntoLhsAndArgs: PartialFunction[Tree, (Tree, Seq[Tree])]
  56. val splitApplyIntoLhsAndArgsLifted: (Tree) => Option[(Tree, Seq[Tree])]
  57. def startsSelectChain(tree: Tree): Boolean
  58. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  59. def toString(): String
    Definition Classes
    AnyRef → Any
  60. def topTypeWith(typeWith: With): With
    Annotations
    @tailrec()
  61. def treeDepth(tree: Tree): Int

    Calculates depth to deepest child in tree.

  62. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  63. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  64. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  65. def withChain(top: Tree): Seq[With]
  66. object MaybeTopLevelStat

Inherited from AnyRef

Inherited from Any

Ungrouped