|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.aop.support.DelegatingIntroductionInterceptor
Convenient implementation of the IntroductionInterceptor interface.
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.
The suppressInterface() method can be used to suppress interfaces implemented
by the delegate but which should not be introduced to the owning
AOP proxy.
Field Summary | |
protected org.apache.commons.logging.Log |
logger
|
Constructor Summary | |
protected |
DelegatingIntroductionInterceptor()
Construct a new DelegatingIntroductionInterceptor. |
|
DelegatingIntroductionInterceptor(java.lang.Object delegate)
Construct a new DelegatingIntroductionInterceptor, providing a delegate that implements the interfaces to be introduced. |
Method Summary | |
java.lang.Class[] |
getIntroducedInterfaces()
|
boolean |
implementsInterface(java.lang.Class intf)
Does this IntroductionInterceptor implement the given interface? |
java.lang.Object |
invoke(org.aopalliance.intercept.MethodInvocation mi)
Subclasses may need to override this if they want to perform custom behaviour in around advice. |
protected boolean |
isMethodOnIntroducedInterface(org.aopalliance.intercept.MethodInvocation mi)
Is this method on an introduced interface? |
void |
suppressInterface(java.lang.Class intf)
Suppress the specified interface, which will have been autodetected due to its implementation by the delegate. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected final org.apache.commons.logging.Log logger
Constructor Detail |
public DelegatingIntroductionInterceptor(java.lang.Object delegate)
delegate
- the delegate that implements the introduced interfacesprotected DelegatingIntroductionInterceptor()
Method Detail |
public void suppressInterface(java.lang.Class intf)
intf
- interface to suppresspublic java.lang.Class[] getIntroducedInterfaces()
public boolean implementsInterface(java.lang.Class intf)
IntroductionInterceptor
implementsInterface
in interface IntroductionInterceptor
intf
- interface to checkIntroductionInterceptor.implementsInterface(java.lang.Class)
public java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation mi) throws java.lang.Throwable
invoke
in interface org.aopalliance.intercept.MethodInterceptor
java.lang.Throwable
protected final boolean isMethodOnIntroducedInterface(org.aopalliance.intercept.MethodInvocation mi)
mi
- method invocation
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |