JBoss.org Community Documentation

Chapter 5. Mixins and Introductions

5.1. Introducing Introductions
5.2. Mixin It Up
5.2.1. Multiple Inheritance
5.3. Aspects with APIs

When people thing of AOP, they usually think of interception, pointcut expressions, aspects, and advices. AOP isn't just about those things. Another important feature in JBoss AOP is the ability to introduce an interface to an existing Java class in a transparent way. You can force a class to implement an interface and even specify an additional class called a mixin that implements that interface. Very similar to C++'s multiple inheritance. Now, why would you want to use introductions/mixins? That's what this chapter is all about.