Refactoring Java generics by inferring wildcards, in practice

Uloženo v:
Podrobná bibliografie
Název: Refactoring Java generics by inferring wildcards, in practice
Autoři: Altidor, John, Smaragdakis, Yannis
Přispěvatelé: European Research Council, Seventh Framework Programme, General Secretariat for Research and Technology
Zdroj: ACM SIGPLAN Notices ; volume 49, issue 10, page 271-290 ; ISSN 0362-1340 1558-1160
Informace o vydavateli: Association for Computing Machinery (ACM)
Rok vydání: 2014
Popis: Wildcard annotations can improve the generality of Java generic libraries, but require heavy manual effort. We present an algorithm for refactoring and inferring more general type instantiations of Java generics using wildcards. Compared to past approaches, our work is practical and immediately applicable: we assume no changes to the Java type system, while taking into account all its intricacies. Our system allows users to select declarations (variables, method parameters, return types, etc.) to generalize and considers declarations not declared in available source code. It then performs an inter-procedural flow analysis and a method body analysis, in order to generalize type signatures. We evaluate our technique on six Java generic libraries. We find that 34% of available declarations of variant type signatures can be generalized - i.e., relaxed with more general wildcard types. On average, 146 other declarations need to be updated when a declaration is generalized, showing that this refactoring would be too tedious and error-prone to perform manually.
Druh dokumentu: article in journal/newspaper
Jazyk: English
DOI: 10.1145/2714064.2660203
Dostupnost: https://doi.org/10.1145/2714064.2660203
https://dl.acm.org/doi/10.1145/2714064.2660203
https://dl.acm.org/doi/pdf/10.1145/2714064.2660203
Rights: https://www.acm.org/publications/policies/copyright_policy#Background
Přístupové číslo: edsbas.1A549A14
Databáze: BASE
Buďte první, kdo okomentuje tento záznam!
Nejprve se musíte přihlásit.