aboutsummaryrefslogtreecommitdiff
path: root/stage1
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2017-03-17 03:37:32 -0400
committerChristopher Vogt <oss.nsp@cvogt.org>2017-03-17 03:41:37 -0400
commit57e3ead5801ef3a88a3b40830b93657217b5a955 (patch)
tree4b9d65105bb315aa295ce383501d0af3bfc6424f /stage1
parentec1ab4fe8b25fdc6462dcf07727233b80563285a (diff)
downloadcbt-57e3ead5801ef3a88a3b40830b93657217b5a955.tar.gz
cbt-57e3ead5801ef3a88a3b40830b93657217b5a955.tar.bz2
cbt-57e3ead5801ef3a88a3b40830b93657217b5a955.zip
fix bug in identifying main classes
Diffstat (limited to 'stage1')
-rw-r--r--stage1/Stage1Lib.scala5
1 files changed, 3 insertions, 2 deletions
diff --git a/stage1/Stage1Lib.scala b/stage1/Stage1Lib.scala
index 1cda9fd..7f7fa37 100644
--- a/stage1/Stage1Lib.scala
+++ b/stage1/Stage1Lib.scala
@@ -184,8 +184,9 @@ class Stage1Lib( logger: Logger ) extends BaseLib{
val arrayClass = classOf[Array[String]]
val unitClass = classOf[Unit]
- iterateClasses( classesRootDirectory, classLoader, true ).filter(
- _.getDeclaredMethods().exists( m =>
+ iterateClasses( classesRootDirectory, classLoader, true ).filter( c =>
+ !c.isInterface &&
+ c.getDeclaredMethods().exists( m =>
m.getName == "main"
&& m.getParameterTypes.toList == List(arrayClass)
&& m.getReturnType == unitClass