diff options
author | Paul Phillips <paulp@improving.org> | 2011-02-02 08:23:36 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-02-02 08:23:36 +0000 |
commit | 7aca20d8d31790569557c87406a74c0c7377de79 (patch) | |
tree | 1301f492080eaec81af6d0280e6dee47c117df09 /test/disabled/presentation/simple-tests | |
parent | ad7fd95c8f6366cc03f5a573b4115641b986803d (diff) | |
download | scala-7aca20d8d31790569557c87406a74c0c7377de79.tar.gz scala-7aca20d8d31790569557c87406a74c0c7377de79.tar.bz2 scala-7aca20d8d31790569557c87406a74c0c7377de79.zip |
Added javap to the repl.
so those hypothetical people who use non-sun jvms won't be thrown off
kilter. You can give it a file argument or a class name, including
classes you just defined in the repl, and it will clean up the repl
mangling on the way out.
scala> class Bippy { def hackenkraks(x: Float, y: Double) = 5 }
defined class Bippy
scala> :javap Bippy
Compiled from "<console>"
public class Bippy extends java.lang.Object implements scala.ScalaObject
[...]
public int hackenkraks(float, double);
Signature: (FD)I
Code:
Stack=1, Locals=4, Args_size=3
0: iconst_5
1: ireturn
scala> :javap scala.collection.Map
public interface scala.collection.Map extends scala.collection.Iterable,scala.collection.MapLike,scala.ScalaObject
[...]
const #7 = Asciz ScalaSig;
const #8 = Asciz <A:Ljava/lang/Object;B:Ljava/lang/Object;>Ljava/lang/Object;Lscala/collection/Iterable<Lscala/Tuple2<TA;TB;>;>;Lscala/collection/MapLike<TA;TB;Lscala/collection/Map<TA;TB;>;>;Lscala/ScalaObject;;
const #9 = Asciz Lscala/reflect/ScalaSignature;;
const #10 = Asciz bytes;
const #11 = Asciz [line elided for control chars: possibly a scala signature]
scala> :javap java.util.Enumeration
Compiled from "Enumeration.java"
public interface java.util.Enumeration
[...]
scala> :javap
/scala/trunk/build/quick/classes/compiler/scala/tools/util/Javap.class
Compiled from "Javap.scala" public class scala.tools.util.Javap
extends java.lang.Object implements scala.ScalaObject [...]
No review.
Diffstat (limited to 'test/disabled/presentation/simple-tests')
0 files changed, 0 insertions, 0 deletions