scala.reflect.internal

TreeInfo

abstract class TreeInfo extends AnyRef

This class ...

Source
TreeInfo.scala
Version

1.0

Linear Supertypes
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. TreeInfo
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by any2stringfmt
  3. by any2ArrowAssoc
  4. by any2Ensuring
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TreeInfo()

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.

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

    Test two objects for inequality.

    Test two objects for inequality.

    returns

    true if !(this == that), false otherwise.

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

    Equivalent to x.hashCode except for boxed numeric types and null.

    Equivalent to x.hashCode except for boxed numeric types and null. For numerics, it returns a hash value which is consistent with value equality: if two value type instances compare as true, then ## will produce the same hash value for each of them. For null returns a hashcode where null.hashCode throws a NullPointerException.

    returns

    a hash value consistent with ==

    Definition Classes
    AnyRef → Any
  4. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from TreeInfo to StringAdd performed by method any2stringadd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ->[B](y: B): (TreeInfo, B)

    Implicit information
    This member is added by an implicit conversion from TreeInfo to ArrowAssoc[TreeInfo] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  6. final def ==(arg0: AnyRef): Boolean

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

    Test two objects for equality.

    Test two objects for equality. The expression x == that is equivalent to if (x eq null) that eq null else x.equals(that).

    returns

    true if the receiver object is equivalent to the argument; false otherwise.

    Definition Classes
    Any
  8. object DynamicApplication extends DynamicApplicationExtractor

  9. object DynamicApplicationNamed extends DynamicApplicationExtractor

  10. object DynamicUpdate extends DynamicApplicationExtractor

  11. object IsFalse extends SeeThroughBlocks[Boolean]

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

  13. object IsTrue extends SeeThroughBlocks[Boolean]

  14. def applyDepth(tree: SymbolTable.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.)

  15. final def asInstanceOf[T0]: T0

    Cast the receiver object to be of type T0.

    Cast the receiver object to be of type T0.

    Note that the success of a cast at runtime is modulo Scala's erasure semantics. Therefore the expression 1.asInstanceOf[String] will throw a ClassCastException at runtime, while the expression List(1).asInstanceOf[List[String]] will not. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the requested type.

    returns

    the receiver object.

    Definition Classes
    Any
    Exceptions thrown
    ClassCastException

    if the receiver object is not an instance of the erasure of type T0.

  16. def catchesAllOf(cdef: SymbolTable.CaseDef, threshold: SymbolTable.Type): Boolean

    Does this CaseDef catch everything of a certain Type?

  17. def catchesThrowable(cdef: SymbolTable.CaseDef): Boolean

    Does this CaseDef catch Throwable?

  18. def clone(): AnyRef

    Create a copy of the receiver object.

    Create a copy of the receiver object.

    The default implementation of the clone method is platform dependent.

    returns

    a copy of the receiver object.

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
    Note

    not specified by SLS as a member of AnyRef

  19. def ensuring(cond: (TreeInfo) ⇒ Boolean, msg: ⇒ Any): TreeInfo

    Implicit information
    This member is added by an implicit conversion from TreeInfo to Ensuring[TreeInfo] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  20. def ensuring(cond: (TreeInfo) ⇒ Boolean): TreeInfo

    Implicit information
    This member is added by an implicit conversion from TreeInfo to Ensuring[TreeInfo] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  21. def ensuring(cond: Boolean, msg: ⇒ Any): TreeInfo

    Implicit information
    This member is added by an implicit conversion from TreeInfo to Ensuring[TreeInfo] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  22. def ensuring(cond: Boolean): TreeInfo

    Implicit information
    This member is added by an implicit conversion from TreeInfo to Ensuring[TreeInfo] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  23. final def eq(arg0: AnyRef): Boolean

    Tests whether the argument (arg0) is a reference to the receiver object (this).

    Tests whether the argument (arg0) is a reference to the receiver object (this).

    The eq method implements an equivalence relation on non-null instances of AnyRef, and has three additional properties:

    • It is consistent: for any non-null instances x and y of type AnyRef, multiple invocations of x.eq(y) consistently returns true or consistently returns false.
    • For any non-null instance x of type AnyRef, x.eq(null) and null.eq(x) returns false.
    • null.eq(null) returns true.

    When overriding the equals or hashCode methods, it is important to ensure that their behavior is consistent with reference equality. Therefore, if two objects are references to each other (o1 eq o2), they should be equal to each other (o1 == o2) and they should hash to the same value (o1.hashCode == o2.hashCode).

    returns

    true if the argument is a reference to the receiver object; false otherwise.

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

    The equality method for reference types.

    The equality method for reference types. Default implementation delegates to eq.

    See also equals in scala.Any.

    returns

    true if the receiver object is equivalent to the argument; false otherwise.

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

    Called by the garbage collector on the receiver object when there are no more references to the object.

    Called by the garbage collector on the receiver object when there are no more references to the object.

    The details of when and if the finalize method is invoked, as well as the interaction between finalize and non-local returns and exceptions, are all platform dependent.

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
    Note

    not specified by SLS as a member of AnyRef

  26. def firstArgument(tree: SymbolTable.Tree): SymbolTable.Tree

  27. def firstConstructor(stats: List[SymbolTable.Tree]): SymbolTable.Tree

    The first constructor definitions in stats

  28. def firstConstructorArgs(stats: List[SymbolTable.Tree]): List[SymbolTable.Tree]

    The arguments to the first constructor in stats.

  29. def firstDefinesClassOrObject(trees: List[SymbolTable.Tree], name: SymbolTable.Name): Boolean

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

  30. def firstTypeArg(tree: SymbolTable.Tree): SymbolTable.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.

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

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

  33. def formatted(fmtstr: String): String

    Returns string formatted according to given format string.

    Returns string formatted according to given format string. Format strings are as for String.format (@see java.lang.String.format).

    Implicit information
    This member is added by an implicit conversion from TreeInfo to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  34. final def getClass(): Class[_]

    A representation that corresponds to the dynamic class of the receiver object.

    A representation that corresponds to the dynamic class of the receiver object.

    The nature of the representation is platform dependent.

    returns

    a representation that corresponds to the dynamic class of the receiver object.

    Definition Classes
    AnyRef → Any
    Note

    not specified by SLS as a member of AnyRef

  35. def hashCode(): Int

    The hashCode method for reference types.

    The hashCode method for reference types. See hashCode in scala.Any.

    returns

    the hash code value for this object.

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

  37. def isAliasTypeDef(tree: SymbolTable.Tree): Boolean

  38. def isApplyDynamicName(name: SymbolTable.Name): Boolean

  39. def isByNameParamType(tpt: SymbolTable.Tree): Boolean

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

  40. def isCatchCase(cdef: SymbolTable.CaseDef): Boolean

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

  41. def isDeclarationOrTypeDef(tree: SymbolTable.Tree): Boolean

    Is tree a declaration or type definition?

  42. def isDefaultCase(cdef: SymbolTable.CaseDef): Boolean

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

  43. def isDeprecatedIdentifier(tree: SymbolTable.Tree): Boolean

  44. def isEarlyDef(tree: SymbolTable.Tree): Boolean

  45. def isEarlyTypeDef(tree: SymbolTable.Tree): Boolean

  46. def isEarlyValDef(tree: SymbolTable.Tree): Boolean

  47. def isExprSafeToInline(tree: SymbolTable.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.

  48. def isGuardedCase(cdef: SymbolTable.CaseDef): Boolean

    Is this case guarded?

  49. final def isInstanceOf[T0]: Boolean

    Test whether the dynamic type of the receiver object is T0.

    Test whether the dynamic type of the receiver object is T0.

    Note that the result of the test is modulo Scala's erasure semantics. Therefore the expression 1.isInstanceOf[String] will return false, while the expression List(1).isInstanceOf[List[String]] will return true. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the specified type.

    returns

    true if the receiver object is an instance of erasure of type T0; false otherwise.

    Definition Classes
    Any
  50. def isInterfaceMember(tree: SymbolTable.Tree): Boolean

    Is tree legal as a member definition of an interface?

  51. def isLeftAssoc(operator: SymbolTable.Name): Boolean

    Is name a left-associative operator?

  52. def isPureDef(tree: SymbolTable.Tree): Boolean

    Is tree a pure (i.

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

  53. def isRepeatedParamType(tpt: SymbolTable.Tree): Boolean

    Is tpt a vararg type of the form T* ?

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

    Is tree a this node which belongs to enclClass?

  55. def isSelfConstrCall(tree: SymbolTable.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?

  56. def isSelfOrSuperConstrCall(tree: SymbolTable.Tree): Boolean

    Is tree a self or super constructor call?

  57. def isSequenceValued(tree: SymbolTable.Tree): Boolean

    Is this pattern node a sequence-valued pattern?

  58. def isStar(x: SymbolTable.Tree): Boolean

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

  59. def isSuperConstrCall(tree: SymbolTable.Tree): Boolean

    Is tree a super constructor call?

  60. def isSwitchAnnotation(tpe: SymbolTable.Type): Boolean

    a Match(Typed(_, tpt), _) must be translated into a switch if isSwitchAnnotation(tpt.

    a Match(Typed(_, tpt), _) must be translated into a switch if isSwitchAnnotation(tpt.tpe)

  61. def isUncheckedAnnotation(tpe: SymbolTable.Type): Boolean

    a Match(Typed(_, tpt), _) is unchecked if isUncheckedAnnotation(tpt.

    a Match(Typed(_, tpt), _) is unchecked if isUncheckedAnnotation(tpt.tpe)

  62. def isVarPattern(pat: SymbolTable.Tree): Boolean

    Is tree a variable pattern?

  63. def isVariableName(name: SymbolTable.Name): Boolean

    Is name a variable name?

  64. def isVariableOrGetter(tree: SymbolTable.Tree): Boolean

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

  65. def isVariablePattern(tree: SymbolTable.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.

  66. def isWildcardArg(tree: SymbolTable.Tree): Boolean

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

  67. def isWildcardStarArg(tree: SymbolTable.Tree): Boolean

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

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

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

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

  70. def mayBeTypePat(tree: SymbolTable.Tree): Boolean

    can this type be a type pattern

  71. def mayBeVarGetter(sym: SymbolTable.Symbol): Boolean

    Is symbol potentially a getter of a variable?

  72. def methPart(tree: SymbolTable.Tree): SymbolTable.Tree

    The method part of an application node

  73. final def ne(arg0: AnyRef): Boolean

    Equivalent to !(this eq that).

    Equivalent to !(this eq that).

    returns

    true if the argument is not a reference to the receiver object; false otherwise.

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

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

  75. final def notify(): Unit

    Wakes up a single thread that is waiting on the receiver object's monitor.

    Wakes up a single thread that is waiting on the receiver object's monitor.

    Definition Classes
    AnyRef
    Note

    not specified by SLS as a member of AnyRef

  76. final def notifyAll(): Unit

    Wakes up all threads that are waiting on the receiver object's monitor.

    Wakes up all threads that are waiting on the receiver object's monitor.

    Definition Classes
    AnyRef
    Note

    not specified by SLS as a member of AnyRef

  77. def preSuperFields(stats: List[SymbolTable.Tree]): List[SymbolTable.ValDef]

    The value definitions marked PRESUPER in this statement sequence

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

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

  79. def stripNamedApplyBlock(tree: SymbolTable.Tree): SymbolTable.Tree

    Named arguments can transform a constructor call into a block, e.

    Named arguments can transform a constructor call into a block, e.g. <init>(b = foo, a = bar) is transformed to { val x$1 = foo val x$2 = bar <init>(x$2, x$1) }

  80. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  81. def toString(): String

    Creates a String representation of this object.

    Creates a String representation of this object. The default representation is platform dependent. On the java platform it is the concatenation of the class name, "@", and the object's hashcode in hexadecimal.

    returns

    a String representation of the object.

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

    If this tree has type parameters, those.

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

  83. def unbind(x: SymbolTable.Tree): SymbolTable.Tree

    The underlying pattern ignoring any bindings

  84. final def wait(): Unit

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

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

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

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

  89. def [B](y: B): (TreeInfo, B)

    Implicit information
    This member is added by an implicit conversion from TreeInfo to ArrowAssoc[TreeInfo] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Shadowed Implict Value Members

  1. val self: Any

    Implicit information
    This member is added by an implicit conversion from TreeInfo to StringAdd performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (treeInfo: StringAdd).self
    Definition Classes
    StringAdd
  2. val self: Any

    Implicit information
    This member is added by an implicit conversion from TreeInfo to StringFormat performed by method any2stringfmt in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (treeInfo: StringFormat).self
    Definition Classes
    StringFormat

Deprecated Value Members

  1. def isPureExpr(tree: SymbolTable.Tree): Boolean

    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use isExprSafeToInline instead

  2. def x: TreeInfo

    Implicit information
    This member is added by an implicit conversion from TreeInfo to ArrowAssoc[TreeInfo] performed by method any2ArrowAssoc in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (treeInfo: ArrowAssoc[TreeInfo]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  3. def x: TreeInfo

    Implicit information
    This member is added by an implicit conversion from TreeInfo to Ensuring[TreeInfo] performed by method any2Ensuring in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (treeInfo: Ensuring[TreeInfo]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from TreeInfo to StringAdd

Inherited by implicit conversion any2stringfmt from TreeInfo to StringFormat

Inherited by implicit conversion any2ArrowAssoc from TreeInfo to ArrowAssoc[TreeInfo]

Inherited by implicit conversion any2Ensuring from TreeInfo to Ensuring[TreeInfo]

No Group