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 metadata

Cited literature [34 references]  Display  Hide  Download
Contributor : Etienne Duris Connect in order to contact the contributor
Submitted on : Friday, September 30, 2011 - 3:41:16 PM
Last modification on : Thursday, September 29, 2022 - 2:21:15 PM
Long-term archiving on: : Saturday, December 31, 2011 - 2:21:53 AM


Files produced by the author(s)


  • HAL Id : hal-00620605, version 1


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⟩



Record views


Files downloads