Advisor (Spring Framework 3.2.1.RELEASE API)
Date: 2013-01-24

org.springframework.aop

## Interface Advisor

- All Known Subinterfaces:
    InstantiationModelAwarePointcutAdvisor, IntroductionAdvisor, PointcutAdvisor
  All Known Implementing Classes:
    AbstractBeanFactoryPointcutAdvisor, AbstractGenericPointcutAdvisor, AbstractPointcutAdvisor, AspectJExpressionPointcutAdvisor, AspectJPointcutAdvisor, AsyncAnnotationAdvisor, BeanFactoryCacheOperationSourceAdvisor, BeanFactoryTransactionAttributeSourceAdvisor, DeclareParentsAdvisor, DefaultBeanFactoryPointcutAdvisor, DefaultIntroductionAdvisor, DefaultPointcutAdvisor, NameMatchMethodPointcutAdvisor, PersistenceExceptionTranslationAdvisor, ReflectiveAspectJAdvisorFactory.SyntheticInstantiationAdvisor, RegexpMethodPointcutAdvisor, StaticMethodMatcherPointcutAdvisor, TransactionAttributeSourceAdvisor

      public interface Advisor

  Base interface holding AOP advice (action to take at a joinpoint) and a filter determining the applicability of the advice (such as a pointcut). This interface is not for use by Spring users, but to allow for commonality in support for different types of advice.

  Spring AOP is based around around advice delivered via method interception, compliant with the AOP Alliance interception API. The Advisor interface allows support for different types of advice, such as before and after advice, which need not be implemented using interception.

  Author:
    Rod Johnson

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Advice` | `getAdvice()` Return the advice part of this aspect.
    `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.

- - ### Method Detail

    - #### getAdvice

          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
      See Also:
        `MethodInterceptor`, `BeforeAdvice`, `ThrowsAdvice`, `AfterReturningAdvice`

    - #### isPerInstance

          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