首页 | 本学科首页   官方微博 | 高级检索  
     

Java语言多重分派机制的研究
引用本文:舒国强,潘爱民. Java语言多重分派机制的研究[J]. 计算机工程与应用, 2002, 38(22): 100-103
作者姓名:舒国强  潘爱民
作者单位:1. 中国科学院软件研究所先进软件技术联合实验室,北京,100080
2. 北京大学计算机研究所,北京,100871
摘    要:多重分派是面向对象语言的一个高级特性,是面向对象程序设计中多态性实现的基础。目前的主流面向对象语言Java与C++都不支持动态多重分派。文章介绍了Java语言现有的分派技术,讨论了为Java语言添加动态多重分派特性的几种途径并对它们的利弊进行比较。文章提出并分析了面向对象语言实现多重分派需要解决的若干问题,最后展望了未来的研究方向。

关 键 词:多重分派  双分派  Java  虚拟机  设计模式
文章编号:1002-8331-(2002)22-0100-04
修稿时间:2001-09-01

A Research on Multi-Method Dispatch Extension in Java
Shu Guoqiang Pan Aimin. A Research on Multi-Method Dispatch Extension in Java[J]. Computer Engineering and Applications, 2002, 38(22): 100-103
Authors:Shu Guoqiang Pan Aimin
Affiliation:Shu Guoqiang 1 Pan Aimin 21
Abstract:Multi-Method dispatch is an advanced topic of Object Oriented(OO)Language.As a mainstream OO lan-guage,Java as currently defined does not support dynamic multi-dispatch.This limits some OO spirit(polymorphism,etc.)to be embodied in Java.This paper is focused on the extensions of Java to support multi-dispatch feather.The authors analyze the dispatching mechanism of Java platform,then several different approachs to implement dynamic multi-dis-patch in Java are introduced and the advantages and drawbacks are discussed.They also present a case study of the simulation of multi-dispatch based on the"Visitor"design pattern and at last,proposal of further work is presented.
Keywords:Multi-dispatch  Double-dispatch  Java  JVM  Design Pattern  
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号