Reputation: 29
So there's a tool for Eclipse in the Eclipse Marketplace that takes java classes and shows its java byte code. I'm wondering is there a similar tool that does the same for Scala classes?
Upvotes: 0
Views: 456
Reputation: 1754
Yes, there is a tool, called scalap
. It takes compiled scala class files (.class
files) and almost shows you scala code. It just lacks method bodies.
If you want to view the instructions of a method, you may use javap -c <classfile>
.
By running javap -v <classfile>
, you'll also see the constant pool.
Upvotes: 0
Reputation: 11
"java classes" is the same as "Scala classes",they are all standard "java class struct". you can take a look "Java virtual machine specification",so I think you can use "javac -v A.class(A.scala)" to view it's ByteCode and constant pool.there has a better tool "010 Editor" to look java class struct,I usually used it;
Upvotes: 1