Aspect weaving in standard Java class libraries

  • Authors:
  • Alex Villazón;Walter Binder;Philippe Moret

  • Affiliations:
  • University of Lugano, Lugano Switzerland;University of Lugano, Lugano Switzerland;University of Lugano, Lugano Switzerland

  • Venue:
  • Proceedings of the 6th international symposium on Principles and practice of programming in Java
  • Year:
  • 2008

Quantified Score

Hi-index 0.01

Visualization

Abstract

Aspect-oriented programming (AOP) has been successfully applied to application code thanks to techniques such as Java bytecode instrumentation. Unfortunately, with current technology, such as AspectJ, aspects cannot be woven into standard Java class libraries. This restriction is particularly unfortunate for aspects that would benefit from a complete bytecode coverage, such as profiling or debugging aspects. In this paper we present an adaptation of the popular AspectJ weaver that is able to weave aspects also into standard Java class libraries. We evaluate our approach with existing profiling aspects, which now cover all bytecode executing in the virtual machine. In addition, we present a new aspect for memory leak detection that also benefits from our approach.