Variant parametric types have been introduced to provide a flexible subtyping mechanism for generic types, and are recently being developed into Java wildcards, shipped worldwide with the JDK 1.5 release. The two approaches, which are strictly related, retain safety by providing rather peculiar and non-trivial mechanisms to restrict access to a class functionalities (methods and fields). In this paper we aim at studying a unified framework to describe this issue in detail, and to facilitate the understanding and exploitation of this new programming concept. Our work is both technical and conceptual. On the one hand, we provide formal rules to access restriction and specialise them for the two approaches, so as to emphasise similarities and differences. On the other hand, we show that such rules promote a natural description and understanding of access restriction in terms of the ability of (instances of) a generic class to produce/consume elements of the abstracted type.

Understanding Access Restriction of Variant Parametric Types and Java Wildcards / Giovanni Rimassa; Mirko Viroli. - STAMPA. - 2:(2005), pp. 1390-1397. (Intervento presentato al convegno ACM Symposium on Applied Computing tenutosi a Santa Fe, New Mexico, USA nel 13-17/03/2005).

Understanding Access Restriction of Variant Parametric Types and Java Wildcards

VIROLI, MIRKO
2005

Abstract

Variant parametric types have been introduced to provide a flexible subtyping mechanism for generic types, and are recently being developed into Java wildcards, shipped worldwide with the JDK 1.5 release. The two approaches, which are strictly related, retain safety by providing rather peculiar and non-trivial mechanisms to restrict access to a class functionalities (methods and fields). In this paper we aim at studying a unified framework to describe this issue in detail, and to facilitate the understanding and exploitation of this new programming concept. Our work is both technical and conceptual. On the one hand, we provide formal rules to access restriction and specialise them for the two approaches, so as to emphasise similarities and differences. On the other hand, we show that such rules promote a natural description and understanding of access restriction in terms of the ability of (instances of) a generic class to produce/consume elements of the abstracted type.
2005
Applied Computing 2005, Proceedings of the 2005 ACM Symposium on Applied Computing
1390
1397
Understanding Access Restriction of Variant Parametric Types and Java Wildcards / Giovanni Rimassa; Mirko Viroli. - STAMPA. - 2:(2005), pp. 1390-1397. (Intervento presentato al convegno ACM Symposium on Applied Computing tenutosi a Santa Fe, New Mexico, USA nel 13-17/03/2005).
Giovanni Rimassa; Mirko 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/10879
 Attenzione

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

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