public class DelegatePerTargetObjectIntroductionInterceptor extends IntroductionInfoSupport implements IntroductionInterceptor
This differs from
DelegatingIntroductionInterceptor in that a single
instance of this class can be used to advise multiple target objects, and each target
object will have its own delegate (whereas DelegatingIntroductionInterceptor
shares the same delegate, and hence the same state across all targets).
suppressInterface method can be used to suppress interfaces
implemented by the delegate class but which should not be introduced to the
owning AOP proxy.
An instance of this class is serializable if the delegates are.
Note: There are some implementation similarities between this class and
DelegatingIntroductionInterceptor that suggest a possible refactoring
to extract a common ancestor class in the future.
DelegatingIntroductionInterceptor, Serialized Form
|Constructor and Description|
|Modifier and Type||Method and Description|
Proceed with the supplied
Subclasses may need to override this if they want to perform custom behaviour in around advice.
getInterfaces, implementInterfacesOnObject, implementsInterface, isMethodOnIntroducedInterface, suppressInterface
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
@Nullable public Object invoke(MethodInvocation mi) throws Throwable
@Nullable protected Object doProceed(MethodInvocation mi) throws Throwable
MethodInterceptor. Subclasses can override this method to intercept method invocations on the target object which is useful when an introduction needs to monitor the object that it is introduced into. This method is never called for
MethodInvocationson the introduced interfaces.