Last active
December 19, 2015 20:09
-
-
Save julianpeeters/6011481 to your computer and use it in GitHub Desktop.
An example of a pickled Scala signature, found in an ASMified case class dump file (main class, not the module class).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ClassWriter cw = new ClassWriter(0); | |
FieldVisitor fv; | |
MethodVisitor mv; | |
AnnotationVisitor av0; | |
cw.visit(V1_5, ACC_PUBLIC + ACC_SUPER, "models/rec", null, "java/lang/Object", new String[] { "scala/ScalaObject", "scala/Product", "scala/Serializable" }); | |
{ | |
av0 = cw.visitAnnotation("Lscala/reflect/ScalaSignature;", true); | |
//The Scala signature is in the bytes below | |
av0.visit("bytes", "\u0006\u0001y4A!\u0001\u0002A\u000b\u0009\u0019!/Z2\u000b\u0003\r\u0009a!\\8eK2\u001c8\u0001A\n\u0006\u0001\u0019qAc\u0006\u0009\u0003\u000f1i\u0011\u0001\u0003\u0006\u0003\u0013)\u0009A\u0001\\1oO*\u00091\"\u0001\u0003kCZ\u000c\u0017BA\u0007\u0009\u0005\u0019y%M[3diB\u0011qBE\u0007\u0002!)\u0009\u0011#A\u0003tG\u0006d\u0017-\u0003\u0002\u0014!\u0009Y1kY1mC>\u0013'.Z2u!\u0009yQ#\u0003\u0002\u0017!\u00099\u0001K]8ek\u000e$\u0008CA\u0008\u0019\u0013\u0009I\u0002C\u0001\u0007TKJL\u0017\r\\5{C\ndW\r\u0003\u0005\u001c\u0001\u0009U\r\u0011\"\u0001\u001d\u0003\u0005IW#A\u000f\u0011\u0005=q\u0012BA\u0010\u0011\u0005\rIe\u000e\u001e\u0005\u0009C\u0001\u0011\u0009\u0012)A\u0005;\u0005\u0011\u0011\u000e\u0009\u0005\u0006G\u0001!\u0009\u0001J\u0001\u0007y%t\u0017\u000e\u001e \u0015\u0005\u0015:\u0003C\u0001\u0014\u0001\u001b\u0005\u0011\u0001\"B\u000e#\u0001\u0004i\u0002bB\u0015\u0001\u0003\u0003%\u0009AK\u0001\u0005G>\u0004\u0018\u0010\u0006\u0002&W!91\u0004\u000bI\u0001\u0002\u0004i\u0002bB\u0017\u0001#\u0003%\u0009AL\u0001\u000fG>\u0004\u0018\u0010\n3fM\u0006,H\u000e\u001e\u00132+\u0005y#FA\u000f1W\u0005\u0009\u0004C\u0001\u001a8\u001b\u0005\u0019$B\u0001\u001b6\u0003%)hn\u00195fG.,GM\u0003\u00027!\u0005Q\u0011M\u001c8pi\u0006$\u0018n\u001c8\n\u0005a\u001a$!E;oG\",7m[3e-\u0006\u0014\u0018.\u00198dK\")!\u0008\u0001C!w\u0005A\u0001.Y:i\u0007>$W\rF\u0001\u001e\u0011\u0015i\u0004\u0001\"\u0011?\u0003!!xn\u0015;sS:<G#A \u0011\u0005\u0001\u001beBA\u0008B\u0013\u0009\u0011\u0005#\u0001\u0004Qe\u0016$WMZ\u0005\u0003\u0009\u0016\u0013aa\u0015;sS:<'B\u0001\"\u0011\u0011\u00159\u0005\u0001\"\u0011I\u0003\u0019)\u0017/^1mgR\u0011\u0011\n\u0014\u0009\u0003\u001f)K!a\u0013\u0009\u0003\u000f\u0009{w\u000e\\3b]\"9QJRA\u0001\u0002\u0004q\u0015a\u0001=%cA\u0011qbT\u0005\u0003!B\u00111!\u00118z\u0011\u0015\u0011\u0006\u0001\"\u0011T\u00035\u0001(o\u001c3vGR\u0004&/\u001a4jqV\u0009A\u000b\u0005\u0002\u0008+&\u0011A\u0009\u0003\u0005\u0006/\u0002!\u0009\u0005H\u0001\raJ|G-^2u\u0003JLG/\u001f\u0005\u00063\u0002!\u0009EW\u0001\u000faJ|G-^2u\u000b2,W.\u001a8u)\u0009q5\u000cC\u0004N1\u0006\u0005\u0009\u0019A\u000f\u0009\u000bu\u0003A\u0011\u00090\u0002\u0011\r\u000cg.R9vC2$\"!S0\u0009\u000f5c\u0016\u0011!a\u0001\u001d\u001e9\u0011MAA\u0001\u0012\u000b\u0011\u0017a\u0001:fGB\u0011ae\u0019\u0004\u0008\u0003\u0009\u0009\u0009\u0011#\u0002e'\u0011\u0019WMD\u000c\u0011\u0009\u0019LW$J\u0007\u0002O*\u0011\u0001\u000eE\u0001\u0008eVtG/[7f\u0013\u0009QwMA\u0009BEN$(/Y2u\rVt7\r^5p]FBQaI2\u0005\u00021$\u0012A\u0019\u0005\u0006{\r$)E\u001c\u000b\u0002)\"9\u0001oYA\u0001\n\u0003\u000b\u0018!B1qa2LHCA\u0013s\u0011\u0015Yr\u000e1\u0001\u001e\u0011\u001d!8-!A\u0005\u0002V\u000cq!\u001e8baBd\u0017\u0010\u0006\u0002wsB\u0019qb^\u000f\n\u0005a\u0004\"AB(qi&|g\u000eC\u0003{g\u0002\u0007Q%A\u0002yIABQ\u0001`2\u0005\u0012u\u000c1B]3bIJ+7o\u001c7wKR\u0009a\u0001"); | |
av0.visitEnd(); | |
} | |
// ATTRIBUTE ScalaSig |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment