我是靠谱客的博主 玩命雨,最近开发中收集的这篇文章主要介绍java dispatch类_《深入理解Java虚拟机》- 重载与重写,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

[root@localhost tmp5]# javap -verbose DynamicDispatch

Classfile/usr/local/asmtools-7.0-build/binaries/lib/tmp5/DynamicDispatch.classLast modified Aug19, 2019; size 514bytes

MD5 checksum a9486d1c7dc75a210b82bd18f1782dfa

Compiled from"DynamicDispatch.java"

public classDynamicDispatch

minor version:0major version:52flags: ACC_PUBLIC, ACC_SUPER

Constant pool:

#1 = Methodref #8.#22 //java/lang/Object."":()V

#2 = Class #23 //DynamicDispatch$Man

#3 = Methodref #2.#22 //DynamicDispatch$Man."":()V

#4 = Class #24 //DynamicDispatch$Woman

#5 = Methodref #4.#22 //DynamicDispatch$Woman."":()V

#6 = Methodref #12.#25 //DynamicDispatch$Human.sayHello:()V

#7 = Class #26 //DynamicDispatch

#8 = Class #27 //java/lang/Object

#9 =Utf8 Woman

#10 =Utf8 InnerClasses

#11 =Utf8 Man

#12 = Class #28 //DynamicDispatch$Human

#13 =Utf8 Human

#14 = Utf8 #15 =Utf8 ()V

#16 =Utf8 Code

#17 =Utf8 LineNumberTable

#18 =Utf8 main

#19 = Utf8 ([Ljava/lang/String;)V

#20 =Utf8 SourceFile

#21 =Utf8 DynamicDispatch.java

#22 = NameAndType #14:#15 //"":()V

#23 =Utf8 DynamicDispatch$Man

#24 =Utf8 DynamicDispatch$Woman

#25 = NameAndType #29:#15 //sayHello:()V

#26 =Utf8 DynamicDispatch

#27 = Utf8 java/lang/Object

#28 =Utf8 DynamicDispatch$Human

#29 =Utf8 sayHello

{publicDynamicDispatch();

descriptor: ()V

flags: ACC_PUBLIC

Code:

stack=1, locals=1, args_size=1

0: aload_01: invokespecial #1 //Method java/lang/Object."":()V

4: returnLineNumberTable:

line1: 0

public static voidmain(java.lang.String[]);

descriptor: ([Ljava/lang/String;)V

flags: ACC_PUBLIC, ACC_STATIC

Code:

stack=2, locals=3, args_size=1

0: new #2 //class DynamicDispatch$Man

3: dup4: invokespecial #3 //Method DynamicDispatch$Man."":()V

7: astore_18: new #4 //class DynamicDispatch$Woman

11: dup12: invokespecial #5 //Method DynamicDispatch$Woman."":()V

15: astore_216: aload_117: invokevirtual #6 //Method DynamicDispatch$Human.sayHello:()V

20: aload_221: invokevirtual #6 //Method DynamicDispatch$Human.sayHello:()V

24: new #4 //class DynamicDispatch$Woman

27: dup28: invokespecial #5 //Method DynamicDispatch$Woman."":()V

31: astore_132: aload_133: invokevirtual #6 //Method DynamicDispatch$Human.sayHello:()V

36: returnLineNumberTable:

line22: 0line23: 8line25: 16line26: 20line28: 24line29: 32line30: 36}

SourceFile:"DynamicDispatch.java"InnerClasses:static #9= #4 of #7; //Woman=class DynamicDispatch$Woman of class DynamicDispatch

static #11= #2 of #7; //Man=class DynamicDispatch$Man of class DynamicDispatch

static abstract #13= #12 of #7; //Human=class DynamicDispatch$Human of class DynamicDispatch

最后

以上就是玩命雨为你收集整理的java dispatch类_《深入理解Java虚拟机》- 重载与重写的全部内容,希望文章能够帮你解决java dispatch类_《深入理解Java虚拟机》- 重载与重写所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(54)

评论列表共有 0 条评论

立即
投稿
返回
顶部