当前位置:网站首页>JVM四种调用方法的指令
JVM四种调用方法的指令
2022-06-29 09:16:00 【Hao_JunJie】
一、非虚方法:
(1)如果方法在编译期间就确定了具体的调用版本,这个版本在运行时是不可变的。这样的方法称之为非虚方法。
(2)静态方法,私有方法,final 方法,实例构造器,显式调用的方法 都是非虚方法。
(3)其他方法成为虚方法。
二、jvm提供了以下几条方法调用指令:
(1)普通调用指令:
1.invokestatic:调用静态方法,解析阶段确定唯一方法版本。
2.invokespecial:调用<init> 方法,私有及显式调用父类方法,解析阶段确定唯一方法版本。
3.invokevirtual:调用所有虚方法,隐式final 修饰的方法。
4.invokerinterface:调用接口方法。
(2)动态调用指令:
1.invokedynamic:动态解析出需要调用的方法,然后执行。
三、总结:前四条指令固化在虚拟机内部,方法的调用执行不可人为干预,而invokedynamic指令则支持用户确定方法版本。期中invokestatic指令和invokespecial指令调用的方法称之为非虚方法。其余的(final修饰的除外)称为虚方法。
边栏推荐
- c语言printf大家族系列
- Summary of PHP memory horse technology research and killing methods
- Cisco ASA、FTD和HyperFlex HX的漏洞分析复现
- 2020-09-21 referer字符串切分 boost gateway代码组织层次
- IDEA自动补全
- 数据源连接池未关闭的问题 Could not open JDBC Connection for transaction
- How to set Google Chrome as the default browser
- Slider validation code
- 基于keil5自动配置stm32f103标准库的官网freertos移植
- Recyclerview refreshes blinks and crashes when deleting items
猜你喜欢

Gmail:如何快速将邮件全部已读

力扣94二叉树的中序遍历

Fully Automated Gross Tumor Volume Delineation From PET in Head and Neck Cancer Using Deep Learning

装饰器模式的应用,包装ServletRequest,增加addParameter方法

Cisco ASA、FTD和HyperFlex HX的漏洞分析复现
![[Huawei certification] the most complete and selected question bank in hcia-datacom history (with answer analysis)](/img/d4/f5ea847573433f7ca7bd429f57e40a.png)
[Huawei certification] the most complete and selected question bank in hcia-datacom history (with answer analysis)

Automatic Multi-Organ SegmVentation on Abdominal CT With Dense V-Networks

CROSSFORMER: A VERSATILE VISION TRANSFORMER BASED ON CROSS-SCALE ATTENTION

Closed training (25) basic web security

Fully Automated Delineation of Gross Tumor Volume for Head and Neck Cancer on PET-CT Using Deep Lear
随机推荐
leetcode MYSQL数据库题目181
Gross Tumor Volume Segmentation for Head and Neck Cancer Radiotherapy using Deep Dense Multi-modalit
IDEA调试失败,报JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_LOAD(196)
Automatic Multi-Organ SegmVentation on Abdominal CT With Dense V-Networks
Idea auto completion
1424. 对角线遍历 II
Data governance: data standard management (Part III)
Introduction to intranet penetration tool FRP
装饰器模式的应用,包装ServletRequest,增加addParameter方法
指针函数和函数指针
A comparison of methods for fully automatic segmentation of tumors and involved nodes in PET/CT of h
RecyclerView刷新闪烁与删除Item时崩溃问题
力扣94二叉树的中序遍历
Introduction to Chang'an chain data storage and construction of MySQL storage environment
Monitoring data source connection pool usage
Idea debugging fails, reporting jdwp no transports initialized, jvmtierror=agent_ ERROR_ TRANSPORT_ LOAD(196)
UE4 compile a single file (VS and editor start respectively)
Cloud management platform: openstack architecture design and detailed interpretation
Kicad learning notes - shortcut keys
Fully Automated Delineation of Gross Tumor Volume for Head and Neck Cancer on PET-CT Using Deep Lear