aboutsummaryrefslogtreecommitdiff
path: root/stage1/Stage1Lib.scala
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2016-03-28 10:54:51 -0400
committerChristopher Vogt <oss.nsp@cvogt.org>2016-03-28 11:53:52 -0400
commitbb7018817c0f41fb867cf9e81fe6f772c79bfafd (patch)
treea691b36a50b05e35f213cfce744853c2f042eb6e /stage1/Stage1Lib.scala
parentbd75b5af0161013b26e2feda9cfcc1e152926071 (diff)
downloadcbt-bb7018817c0f41fb867cf9e81fe6f772c79bfafd.tar.gz
cbt-bb7018817c0f41fb867cf9e81fe6f772c79bfafd.tar.bz2
cbt-bb7018817c0f41fb867cf9e81fe6f772c79bfafd.zip
replace Scala reflection with Java reflection seems to fix the weird exceptions that happened in the previous commit. Also gets rid of scala.reflect dependency in stage2.
Diffstat (limited to 'stage1/Stage1Lib.scala')
-rw-r--r--stage1/Stage1Lib.scala16
1 files changed, 0 insertions, 16 deletions
diff --git a/stage1/Stage1Lib.scala b/stage1/Stage1Lib.scala
index c8af672..69b828b 100644
--- a/stage1/Stage1Lib.scala
+++ b/stage1/Stage1Lib.scala
@@ -42,22 +42,6 @@ class Stage1Lib( val logger: Logger ) extends BaseLib{
def scalaMajorVersion(scalaMinorVersion: String) = scalaMinorVersion.split("\\.").take(2).mkString(".")
- // ========== reflection ==========
-
- /** Create instance of the given class via reflection */
- /*
- def create(cls: String)(args: Any*)(classLoader: ClassLoader): Any = {
- logger.composition( logger.showInvocation("Stage1Lib.create", (cls,args,classLoader)) )
- import scala.reflect.runtime.universe._
- val m = runtimeMirror(classLoader)
- val sym = m.classSymbol(classLoader.loadClass(cls))
- val cm = m.reflectClass( sym.asClass )
- val tpe = sym.toType
- val ctorm = cm.reflectConstructor( tpe.decl(termNames.CONSTRUCTOR).asMethod )
- ctorm(args:_*)
- }
- */
-
// ========== file system / net ==========
def array2hex(padTo: Int, array: Array[Byte]): String = {