Skip to content

Instantly share code, notes, and snippets.

@jaceklaskowski
Created April 21, 2015 20:10
Show Gist options
  • Save jaceklaskowski/ff01917914036bf130cc to your computer and use it in GitHub Desktop.
Save jaceklaskowski/ff01917914036bf130cc to your computer and use it in GitHub Desktop.
:javap in Scala REPL
➜ sandbox scala
Welcome to Scala version 2.11.6 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_40).
Type in expressions to have them evaluated.
Type :help for more information.
scala> :javap
:javap [-lcsvp] [path1 path2 ...]
scala> case class AAA(s: String)
defined class AAA
scala> :javap -public AAA
Compiled from "<console>"
public class AAA implements scala.Product,scala.Serializable {
public java.lang.String s();
public AAA copy(java.lang.String);
public java.lang.String copy$default$1();
public java.lang.String productPrefix();
public int productArity();
public java.lang.Object productElement(int);
public scala.collection.Iterator<java.lang.Object> productIterator();
public boolean canEqual(java.lang.Object);
public int hashCode();
public java.lang.String toString();
public boolean equals(java.lang.Object);
public AAA(java.lang.String);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment