Annotations are a recent feature introduced in languages such as Java, C#, and other languages of the .NET family, which allow programmers to attach arbitrary, structured and typed metadata to their code. These languages run on top of so-called virtual execution environments, e.g. the JVM for Java, and the CLR for .NET languages, which allow for the run-time generation of executable code. In this paper we explore how annotations and the dynamic code generation capability can be used together to provide programmers with high-level methods for dynamic generation and modification of an application’s code — at run-time. The paper introduces the @Java language, which is an extension to Java allowing annotation of arbitrary statements, and the JDAsm library, which is an infrastructure for bytecode manipulation which uses @Java annotations to pinpoint the locations and code fragments that are being manipulated. Together, they allow type-safe and fully symbolic runtime code modification and generation without any need to explicitly address bytecode instructions.

Software manipulation with annotations in Java

GERVASI, VINCENZO;
2008-01-01

Abstract

Annotations are a recent feature introduced in languages such as Java, C#, and other languages of the .NET family, which allow programmers to attach arbitrary, structured and typed metadata to their code. These languages run on top of so-called virtual execution environments, e.g. the JVM for Java, and the CLR for .NET languages, which allow for the run-time generation of executable code. In this paper we explore how annotations and the dynamic code generation capability can be used together to provide programmers with high-level methods for dynamic generation and modification of an application’s code — at run-time. The paper introduces the @Java language, which is an extension to Java allowing annotation of arbitrary statements, and the JDAsm library, which is an infrastructure for bytecode manipulation which uses @Java annotations to pinpoint the locations and code fragments that are being manipulated. Together, they allow type-safe and fully symbolic runtime code modification and generation without any need to explicitly address bytecode instructions.
2008
Gervasi, Vincenzo; Galilei, G. A.
File in questo prodotto:
Non ci sono file associati a questo prodotto.

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/11568/125647
 Attenzione

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

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