Author(s)Rod Johnson, Juergen Hoeller, Adrian Colyer
Implementation of AspectJ ProceedingJoinPoint interface
wrapping an AOP Alliance MethodInvocation.
Note: the getThis() method returns the current Spring AOP proxy.
The getTarget() method returns the current Spring AOP target (which may be
null if there is no target), and is a plain POJO without any advice.
If you want to call the object and have the advice take effect, use
getThis(). A common example is casting the object to an
introduced interface in the implementation of an introduction.
Of course there is no such distinction between target and proxy in AspectJ.
Note: the
getThis()method returns the current Spring AOP proxy. ThegetTarget()method returns the current Spring AOP target (which may benullif there is no target), and is a plain POJO without any advice. If you want to call the object and have the advice take effect, usegetThis(). A common example is casting the object to an introduced interface in the implementation of an introduction.Of course there is no such distinction between target and proxy in AspectJ.