user667022
user667022

Reputation: 351

How can we implement Strategy Pattern using AspectJ

Can I implement 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,

Upvotes: 1

Views: 576

Answers (1)

alehro
alehro

Reputation: 2208

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.

Upvotes: 1

Related Questions