Title :
Refactoring in the presence of annotations
Author :
Noguera, Carlos ; Kellens, A. ; De Roover, Coen ; Jonckers, Viviane
Author_Institution :
Software Languages Lab., Vrije Univ., Brussels, Belgium
Abstract :
Current-day programming languages include constructs to embed meta-data in a program´s source code in the form of annotations. More than mere documentation, these annotations are used in modern frameworks to map source-level entities to domain-specific ones. A common example being the Hibernate Object-Relational Mapping framework that relies on annotations to declare persistence configurations. While the presence of annotations extends the base semantics of the language, it also imposes restrictions on the annotated program. In this paper we consider the manner in which annotations affect automated refactorings, and in particular how they break their behavior preservation. As refactorings, during their condition checking phase, ignore the annotation´s restrictions they can no longer guarantee the preservation of the domain-specific mappings. To address this problem, we propose to make the restrictions of the annotations explicit, and use them to steer the refactoring process. A prototype extension of the Eclipse IDE´s refactoring engine is used to demonstrate our approach on three annotation libraries: Java Persistence API, AspectJ5 and Simple XML serialization.
Keywords :
Java; XML; application program interfaces; programming language semantics; programming languages; software maintenance; AspectJ5; Eclipse IDE refactoring engine; Java Persistence API; Simple XML serialization; annotation form; application program interface; behavior preservation; domain-specific entity; extensible markup language; hibernate object-relational mapping framework; language semantics; meta data; persistence configuration; program refactoring; programming language; source-level entity; Conferences; Databases; Engines; Java; Libraries; Semantics; Software maintenance; Annotations; Refactoring; Tool support;
Conference_Titel :
Software Maintenance (ICSM), 2012 28th IEEE International Conference on
Conference_Location :
Trento
Print_ISBN :
978-1-4673-2313-0
DOI :
10.1109/ICSM.2012.6405291