Aspect-oriented programming

An aspect is a common feature that’s typically scattered across methods, classes, object hierarchies, or even entire object models.

Express this structure in code with traditional object-oriented techniques.

For example, let’s say you wanted to add code to an application to measure the amount of time it would take to invoke a particular method. In plain Java, the code would look something like the following.
[crayon-68040af9317e5380201139/]
Implementing metrics in a AOP Interceptor
[crayon-68040af9317f8740512599/]