public class DelegatingIntroductionInterceptor extends IntroductionInfoSupport implements IntroductionInterceptor
Subclasses merely need to extend this class and implement the interfaces to be introduced themselves. In this case the delegate is the subclass instance itself. Alternatively a separate delegate may implement the interface, and be set via the delegate bean property.
Delegates or subclasses may implement any number of interfaces. All interfaces except IntroductionInterceptor are picked up from the subclass or delegate by default.
suppressInterface method can be used to suppress interfaces
implemented by the delegate but which should not be introduced to the owning
An instance of this class is serializable if the delegate is.
DelegatePerTargetObjectIntroductionInterceptor, Serialized Form
|Modifier||Constructor and Description|
Construct a new DelegatingIntroductionInterceptor.
Construct a new DelegatingIntroductionInterceptor, providing a delegate that implements the interfaces to be introduced.
|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
public DelegatingIntroductionInterceptor(java.lang.Object delegate)
delegate- the delegate that implements the introduced interfaces
public java.lang.Object invoke(MethodInvocation mi) throws java.lang.Throwable
mi- the method invocation joinpoint
Joinpoint.proceed(); might be intercepted by the interceptor
java.lang.Throwable- if the interceptors or the target object throws an exception
protected java.lang.Object doProceed(MethodInvocation mi) throws java.lang.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.