org.springframework.aop.framework.adapter
Class BeforeAdviceAdapter

java.lang.Object
  extended byorg.springframework.aop.framework.adapter.BeforeAdviceAdapter
All Implemented Interfaces:
AdvisorAdapter

class BeforeAdviceAdapter
extends Object
implements AdvisorAdapter

Author:
Rod Johnson

Constructor Summary
(package private) BeforeAdviceAdapter()
           
 
Method Summary
 Interceptor getInterceptor(Advisor advisor)
          Return an AOP Alliance Interceptor exposing the behaviour of the given advice to an interception-based AOP framework.
 boolean supportsAdvice(Advice advice)
          Does this adapter understand this advice object?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeforeAdviceAdapter

BeforeAdviceAdapter()
Method Detail

supportsAdvice

public boolean supportsAdvice(Advice advice)
Description copied from interface: AdvisorAdapter
Does this adapter understand this advice object? Is it valid to invoke the wrap() method with the given advice as an argument?

Specified by:
supportsAdvice in interface AdvisorAdapter
Parameters:
advice - Advice such as a BeforeAdvice.
Returns:
whether this adapter understands the given advice object
See Also:
AdvisorAdapter.supportsAdvice(org.aopalliance.aop.Advice)

getInterceptor

public Interceptor getInterceptor(Advisor advisor)
Description copied from interface: AdvisorAdapter
Return an AOP Alliance Interceptor exposing the behaviour of the given advice to an interception-based AOP framework.

Don't worry about any Pointcut contained in the Advisor; the AOP framework will take care of checking the pointcut.

Specified by:
getInterceptor in interface AdvisorAdapter
Parameters:
advisor - Advisor. the supportsAdvisor() method must have returned true on this object
Returns:
an AOP Alliance interceptor for this Advisor. There's no need to cache instances for efficiency, as the AOP framework caches advice chains.
See Also:
AdvisorAdapter.getInterceptor(org.springframework.aop.Advisor)


Copyright (C) 2003-2004 The Spring Framework Project.