On the reification of Java']Java wildcards

被引:0
|
作者
Cimadamore, Maurizio [1 ]
Viroli, Mirko [1 ]
机构
[1] Univ Bologna DEIS, Alma Mater Studiorum, I-47023 Cesena, Italy
关键词
Generic types; Wildcards; !text type='Java']Java[!/text; Reification;
D O I
10.1016/j.scico.2008.06.005
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Providing runtime information about generic types - that is, reifying generics - is a challenging problem studied in several research papers in the last years. This problem is not tackled in current version of the Java programming language (Java 6), which consequently suffers from serious safety and coherence problems. The quest for finding effective and efficient solutions to this problem is still open, and is further made more complicated by the new mechanism of wildcards introduced in Java J2SE 5.0: its reification aspects are currently unexplored and pose serious semantics and implementation issues. In this paper, we discuss an implementation support for wildcard types in Java. We first analyse the problem from an abstract viewpoint, discussing the issues that have to be faced in order to extend an existing reification technique so as to support wildcards, namely, subtyping, capture conversion and wildcards capture in method calls. Secondly, we present an implementation in the context of the EGO compiler. EGO is an approach for efficiently supporting runtime generics at compile-time: synthetic code is automatically added to the source code by the extended compiler, so as to create generic runtime type information on a by need basis, store it into object instances, and retrieve it when necessary in type-dependent operations. The solution discussed in this paper makes the EGO compiler the first reification approach entirely dealing with the present version of the Java programming language. (C) 2008 Elsevier B.V. All rights reserved.
引用
收藏
页码:59 / 75
页数:17
相关论文
共 50 条
  • [1] A model for Java']Java with wildcards
    Cameron, Nicholas
    Drossopoulou, Sophia
    Ernst, Erik
    [J]. ECOOP 2008 - OBJECT-ORIENTED PROGRAMMING, PROCEEDINGS, 2008, 5142 : 2 - +
  • [2] Java']Java Type Unification with Wildcards
    Pluemicke, Martin
    [J]. APPLICATIONS OF DECLARATIVE PROGRAMMING AND KNOWLEDGE MANAGEMENT, 2009, 5437 : 223 - 240
  • [3] On Access Restriction with Java']Java Wildcards
    Viroli, Mirko
    Rimassa, Giovanni
    [J]. JOURNAL OF OBJECT TECHNOLOGY, 2005, 4 (10):
  • [4] Taming Wildcards in Java']Java's Type System
    Tate, Ross
    Leung, Alan
    Lerner, Sorin
    [J]. ACM SIGPLAN NOTICES, 2011, 46 (06) : 614 - 627
  • [5] Taming Wildcards in Java']Java's Type System
    Tate, Ross
    Leung, Alan
    Lerner, Sorin
    [J]. PLDI 11: PROCEEDINGS OF THE 2011 ACM CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION, 2011, : 614 - 627
  • [6] Reifying Wildcards in Java']Java Using the EGO Approach
    Cimadamore, Maurizio
    Viroli, Mirko
    [J]. APPLIED COMPUTING 2007, VOL 1 AND 2, 2007, : 1315 - 1322
  • [7] Refactoring Java']Java Generics by Inferring Wildcards, In Practice
    Altidor, John
    Smaragdakis, Yannis
    [J]. ACM SIGPLAN NOTICES, 2014, 49 (10) : 271 - 290
  • [8] Java']Java Wildcards Meet Definition-Site Variance
    Altidor, John
    Reichenbach, Christoph
    Smaragdakis, Yannis
    [J]. ECOOP 2012 - OBJECT-ORIENTED PROGRAMMING, 2012, 7313 : 509 - 534
  • [9] Understanding access restriction of variant parametric types and Java wildcards
    Whitestein Technologies AG, Pestalozzistrasse 24, CH-8032 Zurich, Switzerland
    不详
    [J]. ACM SIGAPP, 1600, 1390-1397 (2005):
  • [10] Java']Java, Java']Java, Java']Java and more
    Makulowich, JS
    [J]. DATABASE, 1997, 20 (01): : 74 - 75