Affiliation:
1. Sun Microsystems Laboratories, 2 Elizabeth Drive, Chelmsford, MA
2. Department of Computer Science, Stanford University, Stanford, CA
Abstract
Although the Java programming language has achieved widespread acceptance, one feature that seems sorely missed is the ability to use type parameters (as in Ada generics, C++ templates, and ML polymorphic functions or data types) to allow a general concept to be instantiated to one or more specific types. In this paper, we propose parameterized classes and interfaces in which the type parameter may be constrained to either implement a given interface or extend a given class. This design allows the body of a parameterized class to refer to methods on objects of the parameter type, without introducing any new type relations into the language. We show that these Java extensions may be implemented by expanding parameterized classes at class load time, without any extension or modification to existing Java bytecode, verifier or bytecode interpreter.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Cited by
19 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Generic go to go: dictionary-passing, monomorphisation, and hybrid;Proceedings of the ACM on Programming Languages;2022-10-31
2. Matriona: class nesting with parameterization in Squeak/Smalltalk;Proceedings of the 15th International Conference on Modularity;2016-03-14
3. Lightweight, flexible object-oriented generics;ACM SIGPLAN Notices;2015-08-07
4. Miniboxing;ACM SIGPLAN Notices;2013-11-12
5. Miniboxing;Proceedings of the 2013 ACM SIGPLAN international conference on Object oriented programming systems languages & applications;2013-10-29