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-6b1077a63602f924800855/]
Implementing metrics in a AOP Interceptor
[crayon-6b1077a636039772344265/]