public class

DeclareParentsAdvisor

extends Object
implements IntroductionAdvisor
java.lang.Object
   ↳ org.springframework.aop.aspectj.DeclareParentsAdvisor

Class Overview

Introduction advisor delegating to the given object. Implements AspectJ annotation-style behavior for the DeclareParents annotation.

Summary

Public Constructors
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.
Public Methods
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.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.aop.Advisor
From interface org.springframework.aop.IntroductionAdvisor
From interface org.springframework.aop.IntroductionInfo

Public Constructors

public DeclareParentsAdvisor (Class interfaceType, String typePattern, Class defaultImpl)

Create a new advisor for this DeclareParents field.

Parameters
interfaceType static field defining the introduction
typePattern type pattern the introduction is restricted to
defaultImpl the default implementation class

public DeclareParentsAdvisor (Class interfaceType, String typePattern, Object delegateRef)

Create a new advisor for this DeclareParents field.

Parameters
interfaceType static field defining the introduction
typePattern type pattern the introduction is restricted to
delegateRef the delegate implementation object

Public Methods

public Advice getAdvice ()

Return the advice part of this aspect. An advice may be an interceptor, a before advice, a throws advice, etc.

Returns
  • the advice that should apply if the pointcut matches

public ClassFilter getClassFilter ()

Return the filter determining which target classes this introduction should apply to.

This represents the class part of a pointcut. Note that method matching doesn't make sense to introductions.

Returns
  • the class filter

public Class[] getInterfaces ()

Return the additional interfaces introduced by this Advisor or Advice.

Returns
  • the introduced interfaces

public 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.

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.

Returns
  • whether this advice is associated with a particular target instance

public void validateInterfaces ()

Can the advised interfaces be implemented by the introduction advice? Invoked before adding an IntroductionAdvisor.