Graduate Project

 

Implementing parameterized types in Java Public Deposited

Downloadable Content

Download PDF
https://ir.library.oregonstate.edu/concern/graduate_projects/tm70n3850

Descriptions

Attribute NameValues
Creator
Abstract
  • The goal of this project was to investigate the addition of parameterized types to the Java programming language. Two different parametric polymorphism mechanisms were developed and compared. The first was a preprocessor and the second was a compiler. Parameterized types allow a programmer to create generic programs. Much as a function parameter allows the value of a variable to be changed each time the function is called, a type parameter allows the type of a variable to be changed. This allows the creation of classes that can have the type on which they operate specified at compile time. The principal reason for parameterized types is code reuse. Generic and efficient type-safe libraries are easily created which programmers can instantiate with a type parameter when the library is needed. This research creates a mechanism that allows two similar classes that differ only in the type of value they operate on to share the same function bodies. Two of the main benefits are reducing programming time and reducing errors in the program[Stroustrup91]. Parameterized types allow for the easy creation of reusable libraries. For example, the Standard Template Library (STL) in C++ relies heavily on parameterized types.
Resource Type
Date Issued
Degree Level
Degree Name
Degree Field
Degree Grantor
Commencement Year
Advisor
Committee Member
Academic Affiliation
Rights Statement
Publisher
Peer Reviewed
Language

Relationships

Parents:

This work has no parents.

Items