scala classof java,scala类型系统:2) classOf与getClass方法的差异

不同时的反编译:javap A

:javap A

Size 518 bytes

MD5 checksum 00665e3dcb5ab63ad1b690934dcf755b

Compiled from “”

public class A

minor version: 0

major version: 50

flags: ACC_PUBLIC, ACC_SUPER

Constant pool:

#1 = Utf8 A

#2 = Class #1 // A

#3 = Utf8 java/lang/Object

#4 = Class #3 // java/lang/Object

#5 = Utf8

#6 = Utf8

#7 = Utf8 ()V

#8 = NameAndType #6:#7 // “”:()V

#9 = Methodref #4.#8 // java/lang/Object.””:()V

#10 = Utf8 this

#11 = Utf8 LA;

#12 = Utf8

#13 = Class #12 //

#14 = Utf8 $line30/$read

#15 = Class #14 // $line30/$read

#16 = Utf8

#17 = Utf8

#18 = Class #17 //

#19 = Utf8

#20 = Class #19 //

#21 = Utf8

#22 = Class #21 //

#23 = Utf8 A

#24 = Utf8 Code

#25 = Utf8 LocalVariableTable

#26 = Utf8 LineNumberTable

#27 = Utf8 SourceFile

#28 = Utf8 InnerClasses

#29 = Utf8 Scala

{

public A();

descriptor: ()V

flags: ACC_PUBLIC

Code:

stack=1, locals=1, args_size=1

0: aload_0

1: invokespecial #9 // Method java/lang/Object.””:()V

4: return

LocalVariableTable:

Start Length Slot Name Signature

0 5 0 this LA;

LineNumberTable:

line 14: 0

}

SourceFile: “”

InnerClasses:

public static #16= #13 of #15; //=class of class $line30/$read

public static #16= #18 of #13; //=class of class

public static #16= #20 of #18; //=class of class

public static #16= #22 of #20; //=class of class

public static #23= #2 of #22; //A=class A of class

Error: unknown attribute

Scala: length = 0x0

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值