The ability to annotate code and, in general, the capability to attach arbitrary metadata to portions of a program are features that have become more and more common in programming languages. In fact, various programming techniques and tools exploit their explicit availability for a number of purposes, such as extracting documentation, guiding code profiling, enhancing the description of a data type, marking code for instrumentation (for instance, in aspect-oriented frameworks), and the list could go on. While support to attach metadata to code is not a new concept (programming platforms as CLOS and Smalltalk have pioneered in this field), consistent, pervasive APIs to define and manage code annotations are something comparatively recent on modern platforms like the .NET and Java. Annotations in Java make possible to attach custom, structured metadata to declarations of classes, fields and methods. With this work, we propose an extension to Java (named @Java) that has a richer annotation model, supporting code block and expression annotations. In other words, the granularity of annotations extends to the statement and expression level and does not limit to class, method and field declarations.

@Java: annotations in freedom / W. Cazzola, E. Vacchi - In: SAC '13 : Proceedings of the 28th annual ACM symposium on applied computing, Coimbra, Portugal, March 18-22, 2013New York : ACM Press, 2013 Mar. - ISBN 9781450316569. - pp. 1691-1696 (( Intervento presentato al 28. convegno ACM Symposium on Applied Computing tenutosi a Coimbra, Portugal nel 2013 [10.1145/2480362.2480679].

@Java: annotations in freedom

W. Cazzola
Primo
;
E. Vacchi
Ultimo
2013

Abstract

The ability to annotate code and, in general, the capability to attach arbitrary metadata to portions of a program are features that have become more and more common in programming languages. In fact, various programming techniques and tools exploit their explicit availability for a number of purposes, such as extracting documentation, guiding code profiling, enhancing the description of a data type, marking code for instrumentation (for instance, in aspect-oriented frameworks), and the list could go on. While support to attach metadata to code is not a new concept (programming platforms as CLOS and Smalltalk have pioneered in this field), consistent, pervasive APIs to define and manage code annotations are something comparatively recent on modern platforms like the .NET and Java. Annotations in Java make possible to attach custom, structured metadata to declarations of classes, fields and methods. With this work, we propose an extension to Java (named @Java) that has a richer annotation model, supporting code block and expression annotations. In other words, the granularity of annotations extends to the statement and expression level and does not limit to class, method and field declarations.
Code annotating; Java; Meta-data; Reflection
Settore INF/01 - Informatica
mar-2013
Book Part (author)
File in questo prodotto:
Non ci sono file associati a questo prodotto.
Pubblicazioni consigliate

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/2434/224163
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 6
  • ???jsp.display-item.citation.isi??? ND
social impact