What is the best tool for Java for aspect-oriented programming?
The requirements for a tool are of course IDE support, expressiveness and proper documentation.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
JBossAOP and AspectJ are two commonly used, mature frameworks for AOP. Another popular choice is Spring AOP, but it lacks some of the features of the other two.
Both JBossAOP and AspectJ have similar features, one big difference being that AspectJ relies on extensions to the Java language, whereas JBoss AOP does not.
If your AOP requirements are fairly simple, it’s also worth considering a byte-code manipulation library, such as ASM. I’ve used ASM to implement simple ‘around-advice’ (ie, code that is injected before and after method invocations), and it proved to be a more lightweight alternative to JBossAOP. ASM is cleanly-designed and well-documented.