Skip to content

Instantly share code, notes, and snippets.

@kellegous
Created October 23, 2015 19:45
Show Gist options
  • Select an option

  • Save kellegous/ba553d1176448cf1f6ab to your computer and use it in GitHub Desktop.

Select an option

Save kellegous/ba553d1176448cf1f6ab to your computer and use it in GitHub Desktop.
class A[U <: String, V <: Int] {
def foo(u: U) = 1
def foo(v: V) = 2
}
Classfile /Users/knorton/dev/xxx/A.class
Last modified Oct 23, 2015; size 989 bytes
MD5 checksum 9178110864a2f41521c971eea6fbf17d
Compiled from "A.scala"
public class A<U extends java.lang.String, V extends java.lang.Object> extends java.lang.Object
Signature: #3 // <U:Ljava/lang/String;V:Ljava/lang/Object;>Ljava/lang/Object;
SourceFile: "A.scala"
RuntimeVisibleAnnotations:
0: #7(#8=s#9)
Error: unknown attribute
ScalaInlineInfo: length = 0x13
01 00 00 03 00 13 00 14 00 00 0A 00 10 00 00 0A
00 0B 00
Error: unknown attribute
ScalaSig: length = 0x3
05 00 00
minor version: 0
major version: 50
flags: ACC_PUBLIC, ACC_SUPER
Constant pool:
#1 = Utf8 A
#2 = Class #1 // A
#3 = Utf8 <U:Ljava/lang/String;V:Ljava/lang/Object;>Ljava/lang/Object;
#4 = Utf8 java/lang/Object
#5 = Class #4 // java/lang/Object
#6 = Utf8 A.scala
#7 = Utf8 Lscala/reflect/ScalaSignature;
#8 = Utf8 bytes
#9 = Utf8 E2A! \t\tICaT-9usz!F)\t\"A!YQ\"A )\tQa]2bYL!D\rsPU3gq\"aN\5u}Q\tI\tS\"M!B+\rA+FqC\taI!!G9{G[5oOB1DqI!!H\rAX\rZ3g\tyETiJLgn;%\"a \r!Y \"aF!1BA\n\rIeS!\tAKM>|GCA,a1)\"B\tqCCA0T1\"1
#10 = Utf8 foo
#11 = Utf8 (Ljava/lang/String;)I
#12 = Utf8 this
#13 = Utf8 LA;
#14 = Utf8 u
#15 = Utf8 Ljava/lang/String;
#16 = Utf8 (I)I
#17 = Utf8 v
#18 = Utf8 I
#19 = Utf8 <init>
#20 = Utf8 ()V
#21 = NameAndType #19:#20 // "<init>":()V
#22 = Methodref #5.#21 // java/lang/Object."<init>":()V
#23 = Utf8 Code
#24 = Utf8 LocalVariableTable
#25 = Utf8 LineNumberTable
#26 = Utf8 Signature
#27 = Utf8 (TU;)I
#28 = Utf8 (TV;)I
#29 = Utf8 SourceFile
#30 = Utf8 RuntimeVisibleAnnotations
#31 = Utf8 ScalaInlineInfo
#32 = Utf8 ScalaSig
{
public int foo(U);
descriptor: (Ljava/lang/String;)I
flags: ACC_PUBLIC
Code:
stack=1, locals=2, args_size=2
0: iconst_1
1: ireturn
LocalVariableTable:
Start Length Slot Name Signature
0 2 0 this LA;
0 2 1 u Ljava/lang/String;
LineNumberTable:
line 2: 0
Signature: #27 // (TU;)I
public int foo(V);
descriptor: (I)I
flags: ACC_PUBLIC
Code:
stack=1, locals=2, args_size=2
0: iconst_2
1: ireturn
LocalVariableTable:
Start Length Slot Name Signature
0 2 0 this LA;
0 2 1 v I
LineNumberTable:
line 3: 0
Signature: #28 // (TV;)I
public A();
descriptor: ()V
flags: ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
0: aload_0
1: invokespecial #22 // Method java/lang/Object."<init>":()V
4: return
LocalVariableTable:
Start Length Slot Name Signature
0 5 0 this LA;
LineNumberTable:
line 4: 0
Signature: #20 // ()V
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment