// this is not spring bean yet
I assume this means that at some point there will be a spring bean? Then just use Spring AOP . It should work equally well on anonymous inner classes. In the end, they have names and packages, like any other class.
If this is not the case, you may have to use compilation or time loading.