scala.tools.nsc.ast.Trees

treeInfo

object treeInfo extends TreeInfo

Source
Trees.scala
Linear Supertypes
TreeInfo, TreeInfo, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. treeInfo
  2. TreeInfo
  3. TreeInfo
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. class DynamicApplicationExtractor extends AnyRef

  2. abstract class SeeThroughBlocks[T] extends AnyRef

    Some handy extractors for spotting trees through the the haze of irrelevant braces: i.

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

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

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

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

    Definition Classes
    Any
  6. object BoundTerm extends AnyRef

  7. object BoundType extends AnyRef

  8. object DynamicApplication extends DynamicApplicationExtractor

  9. object DynamicApplicationNamed extends DynamicApplicationExtractor

  10. object DynamicUpdate extends DynamicApplicationExtractor

  11. object EvalSplice extends AnyRef

  12. object FreeDef extends AnyRef

  13. object FreeRef extends AnyRef

  14. object FreeTermDef extends AnyRef

  15. object FreeTypeDef extends AnyRef

  16. object InlineableTreeSplice extends AnyRef

  17. object InlinedTreeSplice extends AnyRef

  18. object InlinedTypeSplice extends AnyRef

  19. object IsFalse extends SeeThroughBlocks[Boolean]

  20. object IsIf extends SeeThroughBlocks[Option[(Tree, Tree, Tree)]]

  21. object IsTrue extends SeeThroughBlocks[Boolean]

  22. object NestedExpr extends AnyRef

  23. object Reified extends AnyRef

  24. object ReifiedTree extends AnyRef

  25. object ReifiedType extends AnyRef

  26. object TreeSplice extends AnyRef

  27. object TypeRefToFreeType extends AnyRef

  28. object TypedOrAnnotated extends AnyRef

  29. object ValueSplice extends AnyRef

  30. def applyDepth(tree: Tree): Int

    The depth of the nested applies: e.

    The depth of the nested applies: e.g. Apply(Apply(Apply(_, _), _), _) has depth 3. Continues through type applications (without counting them.)

    Definition Classes
    TreeInfo
  31. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  32. def catchesAllOf(cdef: CaseDef, threshold: Type): Boolean

    Does this CaseDef catch everything of a certain Type?

    Does this CaseDef catch everything of a certain Type?

    Definition Classes
    TreeInfo
  33. def catchesThrowable(cdef: CaseDef): Boolean

    Does this CaseDef catch Throwable?

    Does this CaseDef catch Throwable?

    Definition Classes
    TreeInfo
  34. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  35. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  36. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  37. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  38. def firstArgument(tree: Tree): Tree

    Definition Classes
    TreeInfo
  39. def firstConstructor(stats: List[Tree]): Tree

    The first constructor definitions in stats

    The first constructor definitions in stats

    Definition Classes
    TreeInfo
  40. def firstConstructorArgs(stats: List[Tree]): List[Tree]

    The arguments to the first constructor in stats.

    The arguments to the first constructor in stats.

    Definition Classes
    TreeInfo
  41. def firstDefinesClassOrObject(trees: List[Tree], name: Name): Boolean

    Does list of trees start with a definition of a class of module with given name (ignoring imports)

    Does list of trees start with a definition of a class of module with given name (ignoring imports)

    Definition Classes
    TreeInfoTreeInfo
  42. def firstTypeArg(tree: Tree): Tree

    If this tree represents a type application (after unwrapping any applies) the first type argument.

    If this tree represents a type application (after unwrapping any applies) the first type argument. Otherwise, EmptyTree.

    Definition Classes
    TreeInfo
  43. def foreachMethodParamAndArg(t: Tree)(f: (Symbol, Tree) ⇒ Unit): Unit

    Definition Classes
    TreeInfo
  44. def foreachMethodParamAndArg(params: List[Symbol], args: List[Tree])(f: (Symbol, Tree) ⇒ Unit): Boolean

    Definition Classes
    TreeInfo
  45. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  46. val global: Trees.this.type

    Definition Classes
    treeInfoTreeInfoTreeInfo
  47. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  48. def isAbsTypeDef(tree: Tree): Boolean

    Definition Classes
    TreeInfo
  49. def isAliasTypeDef(tree: Tree): Boolean

    Definition Classes
    TreeInfo
  50. def isAllowedInUniversalTrait(stat: Tree): Boolean

    Definition Classes
    TreeInfo
  51. def isApplyDynamicName(name: Name): Boolean

    Definition Classes
    TreeInfo
  52. def isByNameParamType(tpt: Tree): Boolean

    Is tpt a by-name parameter type of the form => T?

    Is tpt a by-name parameter type of the form => T?

    Definition Classes
    TreeInfo
  53. def isCatchCase(cdef: CaseDef): Boolean

    Is this pattern node a catch-all or type-test pattern?

    Is this pattern node a catch-all or type-test pattern?

    Definition Classes
    TreeInfo
  54. def isDeclarationOrTypeDef(tree: Tree): Boolean

    Is tree a declaration or type definition?

    Is tree a declaration or type definition?

    Definition Classes
    TreeInfo
  55. def isDefaultCase(cdef: CaseDef): Boolean

    Is this pattern node a catch-all (wildcard or variable) pattern?

    Is this pattern node a catch-all (wildcard or variable) pattern?

    Definition Classes
    TreeInfo
  56. def isEarlyDef(tree: Tree): Boolean

    Definition Classes
    TreeInfo
  57. def isEarlyTypeDef(tree: Tree): Boolean

    Definition Classes
    TreeInfo
  58. def isEarlyValDef(tree: Tree): Boolean

    Definition Classes
    TreeInfo
  59. def isExprSafeToInline(tree: Tree): Boolean

    Is tree an expression which can be inlined without affecting program semantics?

    Is tree an expression which can be inlined without affecting program semantics?

    Note that this is not called "isExprSafeToInline" since purity (lack of side-effects) is not the litmus test. References to modules and lazy vals are side-effecting, both because side-effecting code may be executed and because the first reference takes a different code path than all to follow; but they are safe to inline because the expression result from evaluating them is always the same.

    Definition Classes
    TreeInfo
  60. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  61. def isInterface(mods: HasFlags, body: List[Tree]): Boolean

    Definition Classes
    TreeInfo
  62. def isInterfaceMember(tree: Tree): Boolean

    Is tree legal as a member definition of an interface?

    Is tree legal as a member definition of an interface?

    Definition Classes
    TreeInfoTreeInfo
  63. def isLeftAssoc(operator: Name): Boolean

    Is name a left-associative operator?

    Is name a left-associative operator?

    Definition Classes
    TreeInfo
  64. def isPureDef(tree: Tree): Boolean

    Is tree a pure (i.

    Is tree a pure (i.e. non-side-effecting) definition?

    Definition Classes
    TreeInfoTreeInfo
  65. def isRepeatedParamType(tpt: Tree): Boolean

    Is tpt a vararg type of the form T* ?

    Is tpt a vararg type of the form T* ?

    Definition Classes
    TreeInfo
  66. def isSelf(tree: Tree, enclClass: Symbol): Boolean

    Is tree a this node which belongs to enclClass?

    Is tree a this node which belongs to enclClass?

    Definition Classes
    TreeInfo
  67. def isSelfConstrCall(tree: Tree): Boolean

    Is tree a self constructor call this(.

    Is tree a self constructor call this(...)? I.e. a call to a constructor of the same object?

    Definition Classes
    TreeInfo
  68. def isSelfOrSuperConstrCall(tree: Tree): Boolean

    Is tree a self or super constructor call?

    Is tree a self or super constructor call?

    Definition Classes
    TreeInfo
  69. def isSequenceValued(tree: Tree): Boolean

    Is this pattern node a sequence-valued pattern?

    Is this pattern node a sequence-valued pattern?

    Definition Classes
    TreeInfo
  70. def isStar(x: Tree): Boolean

    Is this tree a Star(_) after removing bindings?

    Is this tree a Star(_) after removing bindings?

    Definition Classes
    TreeInfo
  71. def isSuperConstrCall(tree: Tree): Boolean

    Is tree a super constructor call?

    Is tree a super constructor call?

    Definition Classes
    TreeInfo
  72. def isVarPattern(pat: Tree): Boolean

    Is tree a variable pattern?

    Is tree a variable pattern?

    Definition Classes
    TreeInfo
  73. def isVariableName(name: Name): Boolean

    Is name a variable name?

    Is name a variable name?

    Definition Classes
    TreeInfo
  74. def isVariableOrGetter(tree: Tree): Boolean

    Is tree a mutable variable, or the getter of a mutable field?

    Is tree a mutable variable, or the getter of a mutable field?

    Definition Classes
    TreeInfo
  75. def isVariablePattern(tree: Tree): Boolean

    Is this tree comprised of nothing but identifiers, but possibly in bindings or tuples? For instance

    Is this tree comprised of nothing but identifiers, but possibly in bindings or tuples? For instance

    foo @ (bar, (baz, quux))

    is a variable pattern; if the structure matches, then the remainder is inevitable.

    Definition Classes
    TreeInfo
  76. def isWildcardArg(tree: Tree): Boolean

    Is the argument a wildcard argument of the form _ or x @ _?

    Is the argument a wildcard argument of the form _ or x @ _?

    Definition Classes
    TreeInfo
  77. def isWildcardStarArg(tree: Tree): Boolean

    Is this argument node of the form <expr> : _* ?

    Is this argument node of the form <expr> : _* ?

    Definition Classes
    TreeInfo
  78. def isWildcardStarArgList(trees: List[Tree]): Boolean

    Does this argument list end with an argument of the form <expr> : _* ?

    Does this argument list end with an argument of the form <expr> : _* ?

    Definition Classes
    TreeInfo
  79. def mapMethodParamsAndArgs[R](params: List[Symbol], args: List[Tree])(f: (Symbol, Tree) ⇒ R): List[R]

    Definition Classes
    TreeInfo
  80. def mayBeTypePat(tree: Tree): Boolean

    can this type be a type pattern

    can this type be a type pattern

    Definition Classes
    TreeInfo
  81. def mayBeVarGetter(sym: Symbol): Boolean

    Is symbol potentially a getter of a variable?

    Is symbol potentially a getter of a variable?

    Definition Classes
    TreeInfo
  82. def methPart(tree: Tree): Tree

    The method part of an application node

    The method part of an application node

    Definition Classes
    TreeInfo
  83. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  84. def noPredefImportForUnit(body: Tree): Boolean

    Is this file the body of a compilation unit which should not have Predef imported?

    Is this file the body of a compilation unit which should not have Predef imported?

    Definition Classes
    TreeInfo
  85. final def notify(): Unit

    Definition Classes
    AnyRef
  86. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  87. def preSuperFields(stats: List[Tree]): List[ValDef]

    The value definitions marked PRESUPER in this statement sequence

    The value definitions marked PRESUPER in this statement sequence

    Definition Classes
    TreeInfo
  88. def repeatedParams(tree: Tree): List[ValDef]

    The parameter ValDefs of a method definition that have vararg types of the form T*

    The parameter ValDefs of a method definition that have vararg types of the form T*

    Definition Classes
    TreeInfo
  89. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  90. def toString(): String

    Definition Classes
    AnyRef → Any
  91. def typeParameters(tree: Tree): List[TypeDef]

    If this tree has type parameters, those.

    If this tree has type parameters, those. Otherwise Nil.

    Definition Classes
    TreeInfo
  92. def unbind(x: Tree): Tree

    The underlying pattern ignoring any bindings

    The underlying pattern ignoring any bindings

    Definition Classes
    TreeInfo
  93. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  94. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  95. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  96. def zipMethodParamsAndArgs(t: Tree): List[(Symbol, Tree)]

    Definition Classes
    TreeInfo
  97. def zipMethodParamsAndArgs(params: List[Symbol], args: List[Tree]): List[(Symbol, Tree)]

    Definition Classes
    TreeInfo

Deprecated Value Members

  1. def isPureExpr(tree: Tree): Boolean

    Definition Classes
    TreeInfo
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use isExprSafeToInline instead

Inherited from TreeInfo

Inherited from TreeInfo

Inherited from AnyRef

Inherited from Any