• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

J4 ›› 2007, Vol. 29 ›› Issue (10): 89-91.

• 论文 • 上一篇    下一篇

泛型编程扩展及其JAVA实现

徐文胜[1,2,3] 薛锦云[1,2,3]   

  • 出版日期:2007-10-01 发布日期:2010-06-02

  • Online:2007-10-01 Published:2010-06-02

摘要:

本文对泛型编程的核心思想和技术特征进行了较为深入的分析,介绍了泛型编程在语言实现上的现状与不足,着重论述了作者针对这些不足做出的改进工作,即对类型参数及其约束机制进行扩展以支持通用、高效的算法和数据结构的设计,并以Java语言作为实施例,详细介绍了如何通过现有对象技术来实现比较完整的泛型编程,是现有面向对象语 类泛型编程的首例。

关键词: 泛型编程 面向对象语言 类型参数 约束机制

Abstract:

A thorough and in-depth analysis of the underlying idea and technological characteristics of generic programruing is presented,elaborating its develop ment and weaknesses with respect to language support. With the emphasis on the significant work to compensate for the insufficiency of type parameters a nd their constraints in language realization, aiming at a more general and efficient algorithm and data structure, the paper provides an extension to th e generic programming mechanism and details its implementation in Java, which is the first example to support the extension for generic programming in the family of OO languages.

Key words: (generic programming, object-oriented language, type parameter, constraint mechanism)