|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.aop.aspectj.DeclareParentsAdvisor
public class DeclareParentsAdvisor
Introduction advisor delegating to the given object. Implements AspectJ annotation-style behavior for the DeclareParents annotation.
| Field Summary | |
|---|---|
private Advice |
advice
|
private java.lang.Class |
introducedInterface
|
private ClassFilter |
typePatternClassFilter
|
| Constructor Summary | |
|---|---|
|
DeclareParentsAdvisor(java.lang.Class interfaceType,
java.lang.String typePattern,
java.lang.Class defaultImpl)
Create a new advisor for this DeclareParents field. |
private |
DeclareParentsAdvisor(java.lang.Class interfaceType,
java.lang.String typePattern,
java.lang.Class implementationClass,
Advice advice)
Private constructor to share common code between impl-based delegate and reference-based delegate (cannot use method such as init() to share common code, due the the use of final fields) |
|
DeclareParentsAdvisor(java.lang.Class interfaceType,
java.lang.String typePattern,
java.lang.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. |
java.lang.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 |
| Field Detail |
|---|
private final java.lang.Class introducedInterface
private final ClassFilter typePatternClassFilter
private final Advice advice
| Constructor Detail |
|---|
public DeclareParentsAdvisor(java.lang.Class interfaceType,
java.lang.String typePattern,
java.lang.Class defaultImpl)
interfaceType - static field defining the introductiontypePattern - type pattern the introduction is restricted todefaultImpl - the default implementation class
public DeclareParentsAdvisor(java.lang.Class interfaceType,
java.lang.String typePattern,
java.lang.Object delegateRef)
interfaceType - static field defining the introductiontypePattern - type pattern the introduction is restricted todelegateRef - the delegate implementation object
private DeclareParentsAdvisor(java.lang.Class interfaceType,
java.lang.String typePattern,
java.lang.Class implementationClass,
Advice advice)
interfaceType - static field defining the introductiontypePattern - type pattern the introduction is restricted toimplementationClass - implementation classadvice - delegation advice| Method Detail |
|---|
public ClassFilter getClassFilter()
IntroductionAdvisorThis 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 java.lang.IllegalArgumentException
IntroductionAdvisor
validateInterfaces in interface IntroductionAdvisorjava.lang.IllegalArgumentException - if the advised interfaces can't be
implemented by the introduction advicepublic boolean isPerInstance()
AdvisorNote 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 Advisorpublic Advice getAdvice()
Advisor
getAdvice in interface Advisororg.aopalliance.intercept.MethodInterceptor,
BeforeAdvice,
ThrowsAdvice,
AfterReturningAdvicepublic java.lang.Class[] getInterfaces()
IntroductionInfo
getInterfaces in interface IntroductionInfo
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||