开发者

How can we implement Strategy Pattern using AspectJ

开发者 https://www.devze.com 2023-03-31 14:14 出处:网络
Can I impleme开发者_开发技巧nt Strategy Pattern using AOP. I would like to either 1. Override the default algorithm

Can I impleme开发者_开发技巧nt Strategy Pattern using AOP. I would like to either 1. Override the default algorithm 2. Or Would like to dynamically select any of the given algorithm.

Thanks,


Look at "AspectJ Cookbook" by Russell Miles. It provides implementation of almost all classical design patterns from the point of AspectJ's view. Here is direct link to strategy pattern http://books.google.com/books?id=AKuBlJGl7iUC&lpg=PP1&pg=PA230#v=onepage&q&f=true.

0

精彩评论

暂无评论...
验证码 换一张
取 消