diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-04-22 18:49:09 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-04-23 17:55:26 +0200 |
commit | f54e5c8bbdd719b5c9375c64c2f66b841984456e (patch) | |
tree | 975475778e6102c8f2dbbff0f25a2f114204cbbb /src/compiler/scala/tools/nsc/ast/TreeGen.scala | |
parent | 0f0144c74088e396fc1440166bed5a7c6d5f44f4 (diff) | |
download | scala-f54e5c8bbdd719b5c9375c64c2f66b841984456e.tar.gz scala-f54e5c8bbdd719b5c9375c64c2f66b841984456e.tar.bz2 scala-f54e5c8bbdd719b5c9375c64c2f66b841984456e.zip |
resurrects manifests in their pre-2.10 glory
Diffstat (limited to 'src/compiler/scala/tools/nsc/ast/TreeGen.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/TreeGen.scala | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/TreeGen.scala b/src/compiler/scala/tools/nsc/ast/TreeGen.scala index d3e64811d3..978d83616b 100644 --- a/src/compiler/scala/tools/nsc/ast/TreeGen.scala +++ b/src/compiler/scala/tools/nsc/ast/TreeGen.scala @@ -177,6 +177,22 @@ abstract class TreeGen extends reflect.internal.TreeGen with TreeDSL { def mkSysErrorCall(message: String): Tree = mkMethodCall(Sys_error, List(Literal(Constant(message)))) + /** A creator for a call to a scala.reflect.Manifest or ClassManifest factory method. + * + * @param full full or partial manifest (target will be Manifest or ClassManifest) + * @param constructor name of the factory method (e.g. "classType") + * @param tparg the type argument + * @param args value arguments + * @return the tree + */ + def mkManifestFactoryCall(full: Boolean, constructor: String, tparg: Type, args: List[Tree]): Tree = + mkMethodCall( + if (full) FullManifestModule else PartialManifestModule, + newTermName(constructor), + List(tparg), + args + ) + /** Make a synchronized block on 'monitor'. */ def mkSynchronized(monitor: Tree, body: Tree): Tree = Apply(Select(monitor, Object_synchronized), List(body)) |