|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.aop.aspectj.DeclareParentsAdvisor
public class DeclareParentsAdvisor
Introduction advisor delegating to the given object. Implements AspectJ annotation-style behavior for the DeclareParents annotation.
Constructor Summary | |
---|---|
DeclareParentsAdvisor(Class interfaceType,
String typePattern,
Class defaultImpl)
Create a new advisor for this DeclareParents field. |
|
DeclareParentsAdvisor(Class interfaceType,
String typePattern,
Object delegateRef)
Create a new advisor for this DeclareParents field. |
Method Summary | |
---|---|
Advice |
getAdvice()
Return the advice part of this aspect. |
ClassFilter |
getClassFilter()
Return the filter determining which target classes this introduction should apply to. |
Class[] |
getInterfaces()
Return the additional interfaces introduced by this Advisor or Advice. |
boolean |
isPerInstance()
Return whether this advice is associated with a particular instance (for example, creating a mixin) or shared with all instances of the advised class obtained from the same Spring bean factory. |
void |
validateInterfaces()
Can the advised interfaces be implemented by the introduction advice? Invoked before adding an IntroductionAdvisor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DeclareParentsAdvisor(Class interfaceType, String typePattern, Class defaultImpl)
interfaceType
- static field defining the introductiontypePattern
- type pattern the introduction is restricted todefaultImpl
- the default implementation classpublic DeclareParentsAdvisor(Class interfaceType, String typePattern, Object delegateRef)
interfaceType
- static field defining the introductiontypePattern
- type pattern the introduction is restricted todelegateRef
- the delegate implementation objectMethod Detail |
---|
public ClassFilter getClassFilter()
IntroductionAdvisor
This represents the class part of a pointcut. Note that method matching doesn't make sense to introductions.
getClassFilter
in interface IntroductionAdvisor
public void validateInterfaces() throws IllegalArgumentException
IntroductionAdvisor
validateInterfaces
in interface IntroductionAdvisor
IllegalArgumentException
- if the advised interfaces can't be
implemented by the introduction advicepublic boolean isPerInstance()
Advisor
Note that this method is not currently used by the framework.
Typical Advisor implementations always return true
.
Use singleton/prototype bean definitions or appropriate programmatic
proxy creation to ensure that Advisors have the correct lifecycle model.
isPerInstance
in interface Advisor
public Advice getAdvice()
Advisor
getAdvice
in interface Advisor
MethodInterceptor
,
BeforeAdvice
,
ThrowsAdvice
,
AfterReturningAdvice
public Class[] getInterfaces()
IntroductionInfo
getInterfaces
in interface IntroductionInfo
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |