Is it possible to create an AOP like interceptor using Scalas new Dynamic Type feature? For example: Would it be possible to create a generic stopwatch interceptor that could be mixed in with arbitrary types to profile my code? Or would I still have to use AspectJ?
Share
I’m pretty sure
Dynamicis only used when the object you’re selecting on doesn’t already have what you’re selecting:From the nightly scaladoc:
Note that since the documentation was written, the method has been renamed
applyDynamic.