scala.reflect.internal

TreeInfo

abstract class TreeInfo extends AnyRef

This class ...

Source
TreeInfo.scala
Version

1.0

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. TreeInfo
  2. AnyRef
  3. 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: SymbolTable

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.)

  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?

  12. def catchesThrowable(cdef: CaseDef): Boolean

    Does this CaseDef catch Throwable?

  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

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

    The first constructor definitions in stats

  19. def firstConstructorArgs(stats: List[Tree]): List[Tree]

    The arguments to the first constructor in stats.

  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)

  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.

  22. def foreachMethodParamAndArg(t: Tree)(f: (Symbol, Tree) ⇒ Unit): Unit

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

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

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

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

  27. def isAliasTypeDef(tree: Tree): Boolean

  28. def isByNameParamType(tpt: Tree): Boolean

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

  29. def isCatchCase(cdef: CaseDef): Boolean

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

  30. def isDeclarationOrTypeDef(tree: Tree): Boolean

    Is tree a declaration or type definition?

  31. def isDefaultCase(cdef: CaseDef): Boolean

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

  32. def isEarlyDef(tree: Tree): Boolean

  33. def isEarlyTypeDef(tree: Tree): Boolean

  34. def isEarlyValDef(tree: Tree): Boolean

  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.

  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?

  38. def isLeftAssoc(operator: Name): Boolean

    Is name a left-associative operator?

  39. def isPredefExpr(t: Tree): Boolean

    Is the tree Predef, scala.

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

  40. def isPureDef(tree: Tree): Boolean

    Is tree a pure (i.

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

  41. def isRepeatedParamType(tpt: Tree): Boolean

    Is tpt a vararg type of the form T* ?

  42. def isSelf(tree: Tree, enclClass: Symbol): Boolean

    Is tree a this node which belongs to enclClass?

  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?

  44. def isSelfOrSuperConstrCall(tree: Tree): Boolean

    Is tree a self or super constructor call?

  45. def isSequenceValued(tree: Tree): Boolean

    Is this pattern node a sequence-valued pattern?

  46. def isStar(x: Tree): Boolean

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

  47. def isSuperConstrCall(tree: Tree): Boolean

    Is tree a super constructor call?

  48. def isVarPattern(pat: Tree): Boolean

    Is tree a variable pattern?

  49. def isVariableName(name: Name): Boolean

    Is name a variable name?

  50. def isVariableOrGetter(tree: Tree): Boolean

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

  51. def isWildcardArg(tree: Tree): Boolean

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

  52. def isWildcardStarArg(tree: Tree): Boolean

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

  53. def isWildcardStarArgList(trees: List[Tree]): Boolean

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

  54. def mapMethodParamsAndArgs[R](params: List[Symbol], args: List[Tree])(f: (Symbol, Tree) ⇒ R): List[R]

  55. def mayBeTypePat(tree: Tree): Boolean

    can this type be a type pattern

  56. def mayBeVarGetter(sym: Symbol): Boolean

    Is symbol potentially a getter of a variable?

  57. def methPart(tree: Tree): Tree

    The method part of an application node

  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?

  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

  63. def repeatedParams(tree: Tree): List[ValDef]

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

  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.

  67. def unbind(x: Tree): Tree

    The underlying pattern ignoring any bindings

  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)]

  72. def zipMethodParamsAndArgs(params: List[Symbol], args: List[Tree]): List[(Symbol, Tree)]

Deprecated Value Members

  1. def isPureExpr(tree: Tree): Boolean

    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use isExprSafeToInline instead

Inherited from AnyRef

Inherited from Any