• DocumentCode
    1202935
  • Title

    A reflective implementation of Java multi-methods

  • Author

    Forax, Rémi ; Duris, Etienne ; Roussel, Gilles

  • Author_Institution
    Inst. Gaspard-Monge, Univ. de Marne-la-Vallee, France
  • Volume
    30
  • Issue
    12
  • fYear
    2004
  • Firstpage
    1055
  • Lastpage
    1071
  • 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 multimethods, is known as multipolymorphism. This work presents a new multimethod implementation based on the standard Java reflection mechanism. Provided as a package, it does not require any language extension or any virtual machine modification. The design issues of this reflective implementation are presented together with a new and simple multimethod dispatch algorithm that efficiently supports class loading at runtime. This implementation provides a practicable and fully portable multimethod solution.
  • Keywords
    Java; object-oriented programming; Java multimethods; Java reflection mechanism; dynamic class loading; late-binding; multipolymorphism; Algorithm design and analysis; Dynamic programming; Java; Libraries; Notice of Violation; Packaging machines; Reflection; Runtime; Software maintenance; Virtual machining;
  • fLanguage
    English
  • Journal_Title
    Software Engineering, IEEE Transactions on
  • Publisher
    ieee
  • ISSN
    0098-5589
  • Type

    jour

  • DOI
    10.1109/TSE.2004.90
  • Filename
    1377197