Providing runtime information about generic types---that is, reifying generics---is a challenging problem studied in several research papers in the last years. However, the quest for finding effective and efficient solutions specifically targeted to the Java programming language is still open. In particular, the new mechanism of wildcards introduced in Java 5.0 significantly complicates the overall semantics of generics: its reification aspects are currently unexplored and pose serious implementation issues. In this paper we analyse such issues and study how they have been supported in the context of the EGO compiler. EGO is an approach for efficiently supporting runtime generics at compile-time in Java: synthetic code is automatically added to the source code by the 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. We show how the design of EGO has been completely and successfully extended to represent wildcard types, and how we deal with subtle issues concerning subtyping, capture conversion and wildcards capture in method calls.

M. Cimadamore, M. Viroli (2007). Reifying Wildcards in Java Using the EGO Approach. NEWYORK : ACM.

Reifying Wildcards in Java Using the EGO Approach

CIMADAMORE, MAURIZIO;VIROLI, MIRKO
2007

Abstract

Providing runtime information about generic types---that is, reifying generics---is a challenging problem studied in several research papers in the last years. However, the quest for finding effective and efficient solutions specifically targeted to the Java programming language is still open. In particular, the new mechanism of wildcards introduced in Java 5.0 significantly complicates the overall semantics of generics: its reification aspects are currently unexplored and pose serious implementation issues. In this paper we analyse such issues and study how they have been supported in the context of the EGO compiler. EGO is an approach for efficiently supporting runtime generics at compile-time in Java: synthetic code is automatically added to the source code by the 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. We show how the design of EGO has been completely and successfully extended to represent wildcard types, and how we deal with subtle issues concerning subtyping, capture conversion and wildcards capture in method calls.
2007
Applied Computing 2007, Proceedings of the 2007 ACM Symposium on Applied Computing
1315
1322
M. Cimadamore, M. Viroli (2007). Reifying Wildcards in Java Using the EGO Approach. NEWYORK : ACM.
M. Cimadamore; M. Viroli
File in questo prodotto:
Eventuali allegati, non sono esposti

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11585/45009
 Attenzione

Attenzione! I dati visualizzati non sono stati sottoposti a validazione da parte dell'ateneo

Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 2
  • ???jsp.display-item.citation.isi??? ND
social impact