summaryrefslogtreecommitdiff
path: root/test/script-tests/jar-manifest/src/jar-test.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/script-tests/jar-manifest/src/jar-test.scala')
-rw-r--r--test/script-tests/jar-manifest/src/jar-test.scala34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/script-tests/jar-manifest/src/jar-test.scala b/test/script-tests/jar-manifest/src/jar-test.scala
new file mode 100644
index 0000000000..80e3aafff0
--- /dev/null
+++ b/test/script-tests/jar-manifest/src/jar-test.scala
@@ -0,0 +1,34 @@
+import scala.tools.nsc.util.HasClassPath
+
+package bippy {
+ object Runner {
+ var line = 0
+ def echo(msgs: Any*) = {
+ line += 1
+ Console.println("%-2s %s".format(line, msgs mkString " "))
+ }
+
+ def bippyBoo(quuxParameter: Int) = 5
+ def bippyBingle(imparametorium: String, antidisestablish: Int, x: Float) = ()
+
+ def main(args: Array[String]): Unit = {
+ echo(new dingus.Printable)
+ val namer = new com.thoughtworks.paranamer.BytecodeReadingParanamer
+ getClass.getMethods filter (_.getName startsWith "bippy") foreach { m =>
+ echo(m.getName, "has parameters:", namer.lookupParameterNames(m).mkString(", "))
+ }
+ echo("")
+ echo("Urls exposed through the classloader:")
+ getClass.getClassLoader match {
+ case x: HasClassPath => x.classPathURLs foreach (x => echo(x))
+ case _ => echo("None! Seems unlikely we'd get this far then.")
+ }
+ }
+ }
+}
+
+package dingus {
+ class Printable {
+ override def toString = "\"Greetings from dingus.jar!\""
+ }
+} \ No newline at end of file