Download presentation
Presentation is loading. Please wait.
1
Options for Demeter intergration into AspectJ
John Sung
2
Questions What are the different possible approaches for integrating Demeter into AspectJ? What are the trade-offs? performance time to market functionality user’s experience with the tool “cool factor”
3
Integration Approaches
Optimizing DJ traversals Traversal with 1 Visitor Traversal with Multiple Visitors
4
1. Optimizing DJ Traversals
Partial evaluation of calls to traverse, fetch, gather and asList Use a preprocessor (DemeterJ?) Need to be re-evaluated when class graph, traversals and/or visitors change. Independent from AspectJ
5
2. Traversal 1 Visitor Implement declare traversal t: from A to B
Traversal code generater in ajc CPU would be the “visitor” AspectJ pointcuts and advices would be the advice for the one visitor Exposes naming convention for traversals Integrated into AspectJ
6
3. Traversal Multiple Visitors
Implement declare traversal t(VisitorType): from A to B Traversal code generator in ajc Use inheritance to have different visitors for the same traversal Integrated into AspectJ
7
Approach Comparison 1. Optimizing DJ 2. Traversal 1V 3. Traversal MV
Characteristics 1. Optimizing DJ localized advice scope quick implementation Preprocessor implements some traversal code another tool to run for the developer independent from AspectJ visitors can be specified 2. Traversal 1V globalized advice scope CPU as the one visitor integrated into AspectJ longer implementation time exposes inner workings of traversals 3. Traversal MV visitors can be specified (inheritance) Similar functionality to 1
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.