MultiJava']Java: Modular open classes and symmetric multiple dispatch for Java']Java

被引:107
|
作者
Clifton, C [1 ]
Leavens, GT [1 ]
Chambers, C [1 ]
Millstein, T [1 ]
机构
[1] Iowa State Univ, Dept Comp Sci, Ames, IA 50011 USA
关键词
D O I
10.1145/354222.353181
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We present MultiJava, a backward-compatible extension to Java supporting open classes and symmetric multiple dispatch. Open classes allow one to add to the set of methods that an existing class supports without creating distinct subclasses or editing existing code. Unlike the "Visitor" design pattern, open classes do not require advance planning, and open classes preserve the ability to add new subclasses modularly and safely. Multiple dispatch offers several well-known advantages over the single dispatching of conventional object-oriented languages, including a simple solution to some kinds of "binary method" problems. MultiJava's multiple dispatch retains Java's existing class-based encapsulation properties. We adapt previous theoretical work to allow compilation units to be statically typechecked modularly and safely, ruling out any link-time or run-time type errors. We also present a novel compilation scheme that operates modularly and incurs performance overhead only where open classes or multiple dispatching are actually used.
引用
收藏
页码:130 / 145
页数:16
相关论文
共 50 条
  • [1] Expressive and Modular Predicate Dispatch for Java']Java
    Millstein, Todd
    Frost, Christopher
    Ryder, Jason
    Warth, Alessandro
    [J]. ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 2009, 31 (02):
  • [2] Relaxed MultiJava']Java: Balancing extensibility and modular typechecking
    Millstein, T
    Reay, M
    Chambers, C
    [J]. ACM SIGPLAN NOTICES, 2003, 38 (11) : 224 - 240
  • [3] Maya: Multiple-dispatch syntax extension in Java']Java
    Baker, J
    Hsieh, WC
    [J]. ACM SIGPLAN NOTICES, 2002, 37 (05) : 270 - 281
  • [4] Testing Java']Java classes
    Handwerker, M
    [J]. DR DOBBS JOURNAL, 1999, 24 (09): : 10 - +
  • [5] Efficient dispatch of Java']Java interface methods
    Alpern, B
    Cocchi, A
    Grove, D
    Lieber, D
    [J]. HIGH-PERFORMANCE COMPUTING AND NETWORKING, 2001, 2110 : 621 - 628
  • [6] Creating .INI classes in Java']Java
    Meyer, M
    [J]. DR DOBBS JOURNAL, 2003, 28 (08): : 38 - +
  • [7] Refactoring for parameterizing Java']Java classes
    Kiezun, Adam
    Ernst, Michael D.
    Tip, Frank
    Fuhrer, Robert M.
    [J]. ICSE 2007: 29TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, PROCEEDINGS, 2007, : 437 - 446
  • [8] Modular Java']Java Web Applications
    Kaegi, Simon Richard
    Deugo, Dwight
    [J]. APPLIED COMPUTING 2008, VOLS 1-3, 2008, : 688 - +
  • [9] Open Java']Java - Reply
    Schlack, M
    [J]. BYTE, 1998, 23 (01): : 18 - 18
  • [10] An Empirical Study of "Removed" Classes in Java']Java Open-Source Systems
    Mubarak, Asma
    Counsell, Steve
    Hierons, Robert M.
    [J]. ADVANCES TECHNIQUES IN COMPUTING SCIENCES AND SOFTWARE ENGINEERING, 2010, : 99 - 104