diff options
author | Paul Phillips <paulp@improving.org> | 2011-03-29 02:59:31 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-03-29 02:59:31 +0000 |
commit | 5ebbba7a711105d8b6b19ce6497b3dcef0039c6f (patch) | |
tree | 1e625d215c3c5f4bb7ca0bb375f448cbdff1f880 /src/compiler/scala/tools/nsc/interpreter/package.scala | |
parent | ebedbef6d186c4cc98c9c4445967af43225230dc (diff) | |
download | scala-5ebbba7a711105d8b6b19ce6497b3dcef0039c6f.tar.gz scala-5ebbba7a711105d8b6b19ce6497b3dcef0039c6f.tar.bz2 scala-5ebbba7a711105d8b6b19ce6497b3dcef0039c6f.zip |
Polishing the programmatic interface to the rep...
Polishing the programmatic interface to the repl and other bits
of machinery which we'll have to live with for a while. The repl
classloader now works more like you'd expect a classloader to, as seen
here:
% scala -Dscala.repl.power
scala> class Bippus extends Traversable[Int] { def foreach[U](f: Int => U) = () }
defined class Bippus
scala> intp.classLoader.getResourceAsStream("Bippus").bytes()
res0: Array[Byte] = Array(-54, -2, -70, ...
scala> res0.size
res1: Int = 23954
scala> case class Bippy(x: Int)
defined class Bippy
// classBytes is shorter way to say the same thing scala>
intp.classLoader.classBytes("Bippy").size
res2: Int = 2356
scala> intp.classLoader.classBytes("Bippy$").size
res3: Int = 1741
Closes #4399, no review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/interpreter/package.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/interpreter/package.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/interpreter/package.scala b/src/compiler/scala/tools/nsc/interpreter/package.scala index 13fb860128..b5ba2d9b8e 100644 --- a/src/compiler/scala/tools/nsc/interpreter/package.scala +++ b/src/compiler/scala/tools/nsc/interpreter/package.scala @@ -26,6 +26,8 @@ package object interpreter { type JClass = java.lang.Class[_] type JList[T] = java.util.List[T] type JCollection[T] = java.util.Collection[T] + type InputStream = java.io.InputStream + type OutputStream = java.io.OutputStream private[nsc] val DebugProperty = "scala.repl.debug" private[nsc] val TraceProperty = "scala.repl.trace" |