Comprehensive Aspect Weaving for Java
Autor: | Alex Villazón, Philippe Moret, Danilo Ansaloni, Walter Binder |
---|---|
Rok vydání: | 2011 |
Předmět: |
Aspect-oriented programming
Java Computer science AspectJ Java bytecode 02 engineering and technology Java Virtual Machine Software_PROGRAMMINGTECHNIQUES computer.software_genre Aspect weaving Real time Java 0202 electrical engineering electronic engineering information engineering Bytecode instrumentation Detecting memory leaks Java applet computer.programming_language Recreating crashing conditions Programming language strictfp Profiling 020207 software engineering Java concurrency Debugging 020201 artificial intelligence & image processing Software_PROGRAMMINGLANGUAGES computer Java annotation Software |
Zdroj: | Science of Computer Programming |
DOI: | 10.1016/j.scico.2010.04.007 |
Popis: | 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. |
Databáze: | OpenAIRE |
Externí odkaz: |