Unrelated Before and After Advices
Despite the application of before and after advices shown in this example, these advices can also be used in an unrelated, independent manner. An aspect whose code needs to run only before the joinpoint execution should contain only before advices. The same applies to an aspect that needs to execute after a joinpoint execution, regarding after advices. Furthermore, an aspect that provides functionalities that need to be run before a joinpoint execution, and functionalities that need to be run after, should contain a mix of unrelated before and after advices. Examples of unrelated before and after advices will be shown in the next examples of this tutorial.