Adding type parameterization to the Java language
Ole Agesen, Stephen N. Freund, John C. Mitchell · ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA) · 1997
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.
Cited by 160 works. doi:10.1145/263698.263720
Authors
References
- Java Virtual Machine Specification
- The Annotated C++ Reference Manual
- Abstraction mechanisms in CLU
- The Java Programming Language
- CLU Reference Manual
- Java Security: From HotJava to Netscape and Beyond
- The Java programming language (2nd ed.)
- The Standard Template Library
- Pizza into Java
- STL Tutorial and Reference Guide: C++ Programming with the Standard Template Library