Android - Looking for an AOP solution
- by Serj Lotutovici
I'm writing an application that on the bottom line uses it's internal API for some manipulations. The problem is that to call any method provided by that class first I (or anybody who uses the API) have to call #prepare() and after that #cleanup().
It all worked fine until the application and the API started to grow. And the risk of not calling one of the supplied methods before or after the API is now to big to be ignored (which makes it a bug risky application).
Searching for a solution I found this question. I use Google Guice in my app for other purposes, but Android doesn't support AOP, that's why a use only guice-no_aop-x.jar.
So I end-up with two questions: Is there an AOP solution for android to implement the same approach that is shown in the link above? Or may be someone has an idea that will be suitable for my case?
Thanks in advice!