trait TreeGen extends AnyRef
- Alphabetic
- By Inheritance
- TreeGen
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isTupleTree(tree: Forest.Tree): Boolean
-
def
maybeMkAsInstanceOf(tree: Forest.Tree, pt: Forest.Type, tpe: Forest.Type, beforeRefChecks: Boolean = false): Forest.Tree
Cast
tree
topt
, unless tpe is a subtype of pt, or pt is Unit. - def mkAnd(tree1: Forest.Tree, tree2: Forest.Tree): Forest.Tree
-
def
mkApplyIfNeeded(qual: Forest.Tree): Forest.Tree
If this is a reference to a method with an empty parameter list, wrap it in an apply.
-
def
mkAsInstanceOf(value: Forest.Tree, tpe: Forest.Type, any: Boolean = true, wrapInApply: Boolean = true): Forest.Tree
Builds a cast with given value and type.
- def mkAttributedIdent(sym: Forest.Symbol): Forest.Tree
-
def
mkAttributedQualifier(tpe: Forest.Type, termSym: Forest.Symbol): Forest.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.
-
def
mkAttributedQualifier(tpe: Forest.Type): Forest.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.
-
def
mkAttributedRef(sym: Forest.Symbol): Forest.Tree
Builds a reference to given symbol.
-
def
mkAttributedRef(pre: Forest.Type, sym: Forest.Symbol): Forest.Tree
Builds a reference to given symbol with given stable prefix.
- def mkAttributedSelect(qual: Forest.Tree, sym: Forest.Symbol): Forest.Tree
-
def
mkAttributedThis(sym: Forest.Symbol): Forest.Tree
Builds a reference with stable type to given symbol
- def mkAttributedTypeApply(target: Forest.Tree, method: Forest.Symbol, targs: List[Forest.Type]): Forest.Tree
-
def
mkCast(tree: Forest.Tree, pt: Forest.Type): Forest.Tree
Cast
tree
to typept
-
def
mkClassOf(tp: Forest.Type): Forest.Tree
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.
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.
-
def
mkIsInstanceOf(value: Forest.Tree, tpe: Forest.Type, any: Boolean = true, wrapInApply: Boolean = true): Forest.Tree
Builds an instance test with given value and type.
- def mkMethodCall(target: Forest.Tree, targs: List[Forest.Type], args: List[Forest.Tree]): Forest.Tree
- def mkMethodCall(receiver: Forest.Tree, method: Forest.Symbol, targs: List[Forest.Type], args: List[Forest.Tree]): Forest.Tree
- def mkMethodCall(receiver: Forest.Symbol, methodName: Forest.Name, args: List[Forest.Tree]): Forest.Tree
- def mkMethodCall(target: Forest.Tree, args: List[Forest.Tree]): Forest.Tree
- def mkMethodCall(method: Forest.Symbol, args: List[Forest.Tree]): Forest.Tree
- def mkMethodCall(method: Forest.Symbol, targs: List[Forest.Type], args: List[Forest.Tree]): Forest.Tree
-
def
mkMethodCall(receiver: Forest.Symbol, methodName: Forest.Name, targs: List[Forest.Type], args: List[Forest.Tree]): Forest.Tree
A creator for method calls, e.g.
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.
-
def
mkNewCons(head: Forest.Tree, tail: Forest.Tree): Forest.Tree
Builds a list with given head and tail.
-
def
mkNil: Forest.Tree
Builds a list with given head and tail.
- def mkOr(tree1: Forest.Tree, tree2: Forest.Tree): Forest.Tree
-
def
mkTuple(elems: List[Forest.Tree]): Forest.Tree
Builds a tuple
- def mkTypeApply(target: Forest.Tree, method: Forest.Symbol, targs: List[Forest.Type]): Forest.Tree
-
def
mkTypeApply(fun: Forest.Tree, targs: List[Forest.Tree]): Forest.Tree
Builds a type application node if args.nonEmpty, returns fun otherwise.
-
def
mkUnattributedRef(sym: Forest.Symbol): Forest.Tree
Builds an untyped reference to given symbol.
-
def
mkZero(tp: Forest.Type): Forest.Tree
Builds a tree representing an undefined local, as in var x: T = _ which is appropriate to the given Type.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- def productConstr: Forest.Select
- def rootId(name: Forest.Name): Forest.Select
- def rootScalaDot(name: Forest.Name): Forest.Select
- def scalaAnyRefConstr: Forest.Select
- def scalaDot(name: Forest.Name): Forest.Select
- def scalaFunctionConstr(argtpes: List[Forest.Tree], restpe: Forest.Tree, abstractFun: Boolean = false): Forest.Tree
- def scalaScalaObjectConstr: Forest.Select
- def scalaUnitConstr: Forest.Select
- def serializableConstr: Forest.Select
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )