• Title of article

    Comprehensive aspect weaving for Java

  • Author/Authors

    Alex Villaz?n، نويسنده , , Walter Binder، نويسنده , , Philippe Moret، نويسنده , , Danilo Ansaloni، نويسنده ,

  • Issue Information
    ماهنامه با شماره پیاپی سال 2011
  • Pages
    22
  • From page
    1015
  • To page
    1036
  • Abstract
    Aspect-oriented programming (AOP) has been successfully applied to application code thanks to techniques such as Java bytecode instrumentation. Unfortunately, with existing AOP frameworks for Java such as AspectJ, aspects cannot be woven into the standard Java class library. This restriction is particularly unfortunate for aspects that would benefit from comprehensive aspect weaving with complete method coverage, such as profiling or debugging aspects. In this article we present MAJOR, a new tool for comprehensive aspect weaving, which ensures that aspects are woven into all classes loaded in a Java Virtual Machine, including those in the standard Java class library. MAJOR includes the pluggable module CARAJillo, which supports efficient access to a complete and customizable calling context representation. We validate our approach with three case studies. Firstly, we weave existing profiling aspects with MAJOR which otherwise would generate incomplete profiles. Secondly, we introduce an aspect for memory leak detection that also benefits from comprehensive weaving. Thirdly, we present an aspect subsuming the functionality of ReCrash, an existing tool based on low-level bytecode instrumentation techniques that generates unit tests to reproduce program failures. Our aspect-based tools are concisely implemented in a few lines of code, and leverage MAJOR and CARAJillo for comprehensive aspect weaving and for efficient access to calling context information.
  • Keywords
    Bytecode instrumentation , profiling , Java virtual machine , Aspect-oriented programming , Aspect weaving , Debugging , Detecting memory leaks , Recreating crashing conditions
  • Journal title
    Science of Computer Programming
  • Serial Year
    2011
  • Journal title
    Science of Computer Programming
  • Record number

    1080219