Finally, a business would need to acquire a new toolchain (suite of tools) for development, which is often expensive in both money and time.
[3] To address these business concerns, an aspect weaver enables the use of widely adopted languages like Java with aspect-oriented programming through minor adaptations such as AspectJ which work with existing tools.
[9] The implementation is then injected into the classes at the points identified, thus permitting the code to be executed at the appropriate times without relying on manual duplication by the programmer.
[10] In the programming language AspectJ, pointcuts, join points, and the modularized code are defined in an aspect block similar to that of Java classes.
The aspect weaver determines the appropriate code to generate in each situation as defined by the implementation advice and then injects it into methods matching the specified pointcut.
However, the bytecode weaving process produces more efficient runtime code than would usually be achieved through compiled woven source.
Developments in AspectJ have revealed the potential to incorporate just-in-time compilation into the execution of aspect-oriented code to address performance demands.
Using AspectJ on a Java Virtual Machine, dynamic weaving of aspects at run-time has been shown to improve code performance by 26%.
A proposed solution for AspectJ uses a layered approach which builds upon the existing Java Virtual Machine to add support for join point management and callbacks to a Dynamic Aspect-Oriented Programming Engine.
[19] An alternative implementation uses a weaving engine that uses breakpoints to halt execution at the pointcut, select an appropriate method, embed it into the application, and continue.
[22] Compile-time performance is generally worse in aspect weavers than their traditional compiler counterparts due to the additional work needed for locating methods which match the specified pointcuts.