scala.reflect.internal

TreeGen

abstract class TreeGen extends TreeBuilder

Source
TreeGen.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. TreeGen
  2. TreeBuilder
  3. AnyRef
  4. 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 TreeGen()

Abstract Value Members

  1. abstract val global: SymbolTable

    Definition Classes
    TreeGenTreeBuilder

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 TreeGen to StringAdd performed by method any2stringadd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ->[B](y: B): (TreeGen, B)

    Implicit information
    This member is added by an implicit conversion from TreeGen to ArrowAssoc[TreeGen] 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. 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.

  9. 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[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
    Note

    not specified by SLS as a member of AnyRef

  10. def ensuring(cond: (TreeGen) ⇒ Boolean, msg: ⇒ Any): TreeGen

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

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

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

    Implicit information
    This member is added by an implicit conversion from TreeGen to Ensuring[TreeGen] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. 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
  15. 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 Any.

    returns

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

    Definition Classes
    AnyRef → Any
  16. 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[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
    Note

    not specified by SLS as a member of AnyRef

  17. 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 TreeGen to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  18. 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

  19. def hashCode(): Int

    The hashCode method for reference types.

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

    returns

    the hash code value for this object.

    Definition Classes
    AnyRef → Any
  20. 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
  21. def maybeMkAsInstanceOf(tree: Tree, pt: Type, tpe: Type, beforeRefChecks: Boolean = false): Tree

    Cast tree to pt, unless tpe is a subtype of pt, or pt is Unit.

  22. def mkAnd(tree1: Tree, tree2: Tree): Tree

  23. def mkApplyIfNeeded(qual: Tree): Tree

    If this is a reference to a method with an empty parameter list, wrap it in an apply.

  24. def mkAsInstanceOf(value: Tree, tpe: Type, any: Boolean = true, wrapInApply: Boolean = true): Tree

    Builds a cast with given value and type.

  25. def mkAttributedIdent(sym: Symbol): Tree

    Builds a typed Ident with an underlying symbol.

    Builds a typed Ident with an underlying symbol.

    Definition Classes
    TreeGenTreeBuilder
  26. def mkAttributedQualifier(tpe: Type, termSym: Symbol): Tree

    Builds a reference to value whose type is given stable prefix.

    Builds a reference to value whose type is given stable prefix. If the type is unsuitable, e.g. it is a TypeRef for an abstract type variable, then an Ident will be made using termSym as the Ident's symbol. In that case, termSym must not be NoSymbol.

    Definition Classes
    TreeGenTreeBuilder
  27. def mkAttributedQualifier(tpe: Type): Tree

    Builds a reference to value whose type is given stable prefix.

    Builds a reference to value whose type is given stable prefix. The type must be suitable for this. For example, it must not be a TypeRef pointing to an abstract type variable.

    Definition Classes
    TreeGenTreeBuilder
  28. def mkAttributedRef(sym: Symbol): Tree

    Builds a reference to given symbol.

    Builds a reference to given symbol.

    Definition Classes
    TreeGenTreeBuilder
  29. def mkAttributedRef(pre: Type, sym: Symbol): Tree

    Builds a reference to given symbol with given stable prefix.

    Builds a reference to given symbol with given stable prefix.

    Definition Classes
    TreeGenTreeBuilder
  30. def mkAttributedSelect(qual: Tree, sym: Symbol): Tree

    Builds a typed Select with an underlying symbol.

    Builds a typed Select with an underlying symbol.

    Definition Classes
    TreeGenTreeBuilder
  31. def mkAttributedStableRef(sym: Symbol): Tree

  32. def mkAttributedStableRef(pre: Type, sym: Symbol): Tree

    Builds a reference with stable type to given symbol

  33. def mkAttributedThis(sym: Symbol): Tree

    Builds a typed This reference to given symbol.

    Builds a typed This reference to given symbol.

    Definition Classes
    TreeGenTreeBuilder
  34. def mkAttributedTypeApply(target: Tree, method: Symbol, targs: List[Type]): Tree

  35. def mkBasisUniverseRef: Tree

  36. def mkClassOf(tp: Type): Tree

    Apparently we smuggle a Type around as a Literal(Constant(tp)) and the implementation of Constant#tpe is such that x.

    Apparently we smuggle a Type around as a Literal(Constant(tp)) and the implementation of Constant#tpe is such that x.tpe becomes ClassType(value.asInstanceOf[Type]), i.e. java.lang.Class[Type]. Can't find any docs on how/why it's done this way. See ticket SI-490 for some interesting comments from lauri alanko suggesting that the type given by classOf[T] is too strong and should be weakened so as not to suggest that classOf[List[String]] is any different from classOf[List[Int]].

    !!! See deconstMap in Erasure for one bug this encoding has induced: I would be very surprised if there aren't more.

  37. def mkConstantZero(tp: Type): Constant

  38. def mkIsInstanceOf(value: Tree, tpe: Type, any: Boolean = true, wrapInApply: Boolean = true): Tree

    Builds an instance test with given value and type.

  39. def mkMethodCall(target: Tree, targs: List[Type], args: List[Tree]): Tree

    Definition Classes
    TreeGenTreeBuilder
  40. def mkMethodCall(receiver: Tree, method: Symbol, targs: List[Type], args: List[Tree]): Tree

    Definition Classes
    TreeGenTreeBuilder
  41. def mkMethodCall(receiver: Symbol, methodName: Name, args: List[Tree]): Tree

    Definition Classes
    TreeGenTreeBuilder
  42. def mkMethodCall(target: Tree, args: List[Tree]): Tree

    Definition Classes
    TreeGenTreeBuilder
  43. def mkMethodCall(method: Symbol, args: List[Tree]): Tree

    Definition Classes
    TreeGenTreeBuilder
  44. def mkMethodCall(method: Symbol, targs: List[Type], args: List[Tree]): Tree

    Definition Classes
    TreeGenTreeBuilder
  45. def mkMethodCall(receiver: Symbol, methodName: Name, targs: List[Type], args: List[Tree]): Tree

    A creator for method calls, e.

    A creator for method calls, e.g. fn[T1, T2, ...](v1, v2, ...) There are a number of variations.

    receiver

    symbol of the method receiver

    methodName

    name of the method to call

    targs

    type arguments (if Nil, no TypeApply node will be generated)

    args

    value arguments

    returns

    the newly created trees.

    Definition Classes
    TreeGenTreeBuilder
  46. def mkNewCons(head: Tree, tail: Tree): Tree

    Builds a list with given head and tail.

  47. def mkNil: Tree

    Builds a list with given head and tail.

  48. def mkNullaryCall(method: Symbol, targs: List[Type]): Tree

    Definition Classes
    TreeGenTreeBuilder
  49. def mkOr(tree1: Tree, tree2: Tree): Tree

  50. def mkRuntimeUniverseRef: Tree

  51. def mkTuple(elems: List[Tree]): Tree

    Builds a tuple

  52. def mkTypeApply(target: Tree, method: Symbol, targs: List[Type]): Tree

  53. def mkTypeApply(fun: Tree, targs: List[Tree]): Tree

    Builds a type application node if args.

    Builds a type application node if args.nonEmpty, returns fun otherwise.

  54. def mkUnattributedRef(sym: Symbol): Tree

    Builds an untyped reference to given symbol.

  55. def mkZero(tp: Type): Tree

    Builds a tree representing an undefined local, as in var x: T = _ which is appropriate to the given Type.

  56. 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
  57. 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

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

  59. def productConstr: Select

  60. def rootId(name: Name): Select

  61. def rootScalaDot(name: Name): Select

  62. def scalaAnnotationDot(name: Name): Select

  63. def scalaAnyRefConstr: Select

  64. def scalaDot(name: Name): Select

  65. def scalaFunctionConstr(argtpes: List[Tree], restpe: Tree, abstractFun: Boolean = false): Tree

  66. def scalaUnitConstr: Select

  67. def serializableConstr: Select

  68. def stabilize(tree: Tree): Tree

    Replaces tree type with a stable type if possible

  69. def stableTypeFor(tree: Tree): Option[Type]

    Computes stable type for a tree if possible

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

    Definition Classes
    AnyRef
  71. 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
  72. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()
  75. def [B](y: B): (TreeGen, B)

    Implicit information
    This member is added by an implicit conversion from TreeGen to ArrowAssoc[TreeGen] 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 TreeGen 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:
    (treeGen: StringAdd).self
    Definition Classes
    StringAdd
  2. val self: Any

    Implicit information
    This member is added by an implicit conversion from TreeGen 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:
    (treeGen: StringFormat).self
    Definition Classes
    StringFormat

Deprecated Value Members

  1. def x: TreeGen

    Implicit information
    This member is added by an implicit conversion from TreeGen to ArrowAssoc[TreeGen] 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:
    (treeGen: ArrowAssoc[TreeGen]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  2. def x: TreeGen

    Implicit information
    This member is added by an implicit conversion from TreeGen to Ensuring[TreeGen] 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:
    (treeGen: Ensuring[TreeGen]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from TreeBuilder

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from TreeGen to StringAdd

Inherited by implicit conversion any2stringfmt from TreeGen to StringFormat

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

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