August 2018
Intermediate to advanced
314 pages
8h 9m
English
If we want a specific method to be a pointcut, we have to annotate it with the @AroundInvoke annotation. The @AroundInvoke method (or the pointcut method) must return an object, and must have a parameter of the InvocationContext type. As well as this, the pointcut method should throw an exception.
The InvocationContext methods can be called in order to access information about the current context, such as the name of the pointcut, the method annotations, the method parameters, and so on. However, it is important to note that in an interception situation, the target class method is invoked only when the @AroundInvoke method calls the proceed method. As a result, the @AroundInvoke method must call the proceed ...
Read now
Unlock full access