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-66344c12cfe7a185283984/]
Implementing metrics in a AOP Interceptor
[crayon-66344c12cfe81824529752/]