首页> 中文期刊> 《计算机时代》 >提高Java程序动态性的一个新途径

提高Java程序动态性的一个新途径

         

摘要

为支持Groovy、JRuby等新的动态类型语言,JDK1.7在Java虚拟机上特意引入了新的动态调用指令。文章提出将其应用于Java程序,在生成的Java类文件中用它替换某些成员访问指令,由此可以突破Java原本固有的运行模式,引入满足应用需要的新运行机制,使程序更简单、灵活,提高开发效率。同时分析了原有成员访问指令的局限,讨论了新的动态调用指令的优势,给出了指令替换的实现方法。%Since JDK1.7, the invokedynamic instruction has been introduced to JVM to support dynamically typed languages such as Groovy, JRuby. This paper proposes replacing some appropriate member access instructions with it in a Java class file, which may break Java inherent operation mode, introduce a new mechanism that meets the application needs, make the program more simple and flexible, and improve development efficiency. At the same time, the limitations of the original member access instruction and the advantages of the invokedynamic instruction is analyzed, and the method to realize the instruction replacement is given.

著录项

相似文献

  • 中文文献
  • 外文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号