scala.tools.nsc.ast

TreeInfo

abstract class TreeInfo extends TreeInfo

This class ...

Source
TreeInfo.scala
Version

1.0

Linear Supertypes
TreeInfo, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. TreeInfo
  2. TreeInfo
  3. AnyRef
  4. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TreeInfo()

Type Members

  1. abstract class SeeThroughBlocks[T] extends AnyRef

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

Abstract Value Members

  1. abstract val global: Global

    Definition Classes
    TreeInfoTreeInfo

Concrete 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 IsFalse extends SeeThroughBlocks[Boolean]

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

  8. object IsTrue extends SeeThroughBlocks[Boolean]

  9. 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
  10. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  11. 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
  12. def catchesThrowable(cdef: CaseDef): Boolean

    Does this CaseDef catch Throwable?

    Does this CaseDef catch Throwable?

    Definition Classes
    TreeInfo
  13. def clone(): AnyRef

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

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

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

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

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

    The first constructor definitions in stats

    The first constructor definitions in stats

    Definition Classes
    TreeInfo
  19. 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
  20. 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
  21. 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
  22. def foreachMethodParamAndArg(t: Tree)(f: (Symbol, Tree) ⇒ Unit): Unit

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

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

    Definition Classes
    AnyRef → Any
  25. def hashCode(): Int

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

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

    Definition Classes
    TreeInfo
  28. 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
  29. 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
  30. def isDeclarationOrTypeDef(tree: Tree): Boolean

    Is tree a declaration or type definition?

    Is tree a declaration or type definition?

    Definition Classes
    TreeInfo
  31. 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
  32. def isEarlyDef(tree: Tree): Boolean

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

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

    Definition Classes
    TreeInfo
  35. 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
  36. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  37. 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
  38. def isLeftAssoc(operator: Name): Boolean

    Is name a left-associative operator?

    Is name a left-associative operator?

    Definition Classes
    TreeInfo
  39. def isPredefExpr(t: Tree): Boolean

    Is the tree Predef, scala.

    Is the tree Predef, scala.Predef, or _root_.scala.Predef?

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

    Is tree a pure (i.

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

    Definition Classes
    TreeInfoTreeInfo
  41. 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
  42. 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
  43. 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
  44. def isSelfOrSuperConstrCall(tree: Tree): Boolean

    Is tree a self or super constructor call?

    Is tree a self or super constructor call?

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

    Is this pattern node a sequence-valued pattern?

    Is this pattern node a sequence-valued pattern?

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

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

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

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

    Is tree a super constructor call?

    Is tree a super constructor call?

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

    Is tree a variable pattern?

    Is tree a variable pattern?

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

    Is name a variable name?

    Is name a variable name?

    Definition Classes
    TreeInfo
  50. 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
  51. 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
  52. def isWildcardStarArg(tree: Tree): Boolean

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

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

    Definition Classes
    TreeInfo
  53. 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
  54. def mapMethodParamsAndArgs[R](params: List[Symbol], args: List[Tree])(f: (Symbol, Tree) ⇒ R): List[R]

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

    can this type be a type pattern

    can this type be a type pattern

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

    Is symbol potentially a getter of a variable?

    Is symbol potentially a getter of a variable?

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

    The method part of an application node

    The method part of an application node

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

    Definition Classes
    AnyRef
  59. 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
  60. final def notify(): Unit

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

    Definition Classes
    AnyRef
  62. 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
  63. 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
  64. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  65. def toString(): String

    Definition Classes
    AnyRef → Any
  66. 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
  67. def unbind(x: Tree): Tree

    The underlying pattern ignoring any bindings

    The underlying pattern ignoring any bindings

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

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

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

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

    Definition Classes
    TreeInfo
  72. 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 AnyRef

Inherited from Any