Skip to Main content Skip to Navigation
Journal articles

A Reflective Implementation of Java Multi-Methods

Abstract : In Java, method implementations are chosen at runtime by late-binding with respect to the runtime class of just the receiver argument. However, in order to simplify many programming designs, late-binding with respect to the dynamic type of all arguments is sometimes desirable. This behavior, usually provided by multi-methods, is known as multi-polymorphism. This paper presents a new multi-method implementation based on the standard Java re flection mechanism. Provided as a package, it does not require any language extension nor any virtual machine modi cation. The design issues of this refl ective implementation are presented together with a new and simple multi-method dispatch algorithm that effi ciently supports class loading at runtime. This implementation provides a practicable and fully portable multi-method solution.
Document type :
Journal articles
Complete list of metadatas

Cited literature [34 references]  Display  Hide  Download

https://hal-upec-upem.archives-ouvertes.fr/hal-00620605
Contributor : Etienne Duris <>
Submitted on : Friday, September 30, 2011 - 3:41:16 PM
Last modification on : Wednesday, February 26, 2020 - 7:06:05 PM
Long-term archiving on: : Saturday, December 31, 2011 - 2:21:53 AM

File

tse04-prelim.pdf
Files produced by the author(s)

Identifiers

  • HAL Id : hal-00620605, version 1

Collections

Citation

Rémi Forax, Étienne Duris, Gilles Roussel. A Reflective Implementation of Java Multi-Methods. IEEE Transactions on Software Engineering, Institute of Electrical and Electronics Engineers, 2004, 30 (12), pp.1055--1071. ⟨hal-00620605⟩

Share

Metrics

Record views

470

Files downloads

312