摘要
多重分派是面向对象语言的一个高级特性,是面向对象程序设计中多态性实现的基础。目前的主流面向对象语言Java与C++都不支持动态多重分派。文章介绍了Java语言现有的分派技术,讨论了为Java语言添加动态多重分派特性的几种途径并对它们的利弊进行比较。文章提出并分析了面向对象语言实现多重分派需要解决的若干问题,最后展望了未来的研究方向。
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.
出处
《计算机工程与应用》
CSCD
北大核心
2002年第22期100-103,共4页
Computer Engineering and Applications