org.virtualmock.aspect.aspectwerkz
Class MethodInterceptorAdvice

java.lang.Object
  extended byorg.codehaus.aspectwerkz.xmldef.advice.AbstractAdvice
      extended byorg.codehaus.aspectwerkz.xmldef.advice.AroundAdvice
          extended byorg.virtualmock.aspect.aspectwerkz.MethodInterceptorAdvice
All Implemented Interfaces:
org.codehaus.aspectwerkz.xmldef.advice.Advice, java.io.Serializable

public class MethodInterceptorAdvice
extends org.codehaus.aspectwerkz.xmldef.advice.AroundAdvice

This is the advice which intercepts all method calls (except those which are excluded through the pointcuts) It then programatically determines if it should process the call, or ignore it and let it proceed. If it intercepts a call, it can either record it as a mock call, or play it back if a matching call was previously recorded.

Version:
$Revision: 1.14 $
Author:
Chad Woolley
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.codehaus.aspectwerkz.xmldef.advice.AbstractAdvice
m_adviceClass, m_container, m_deploymentModel, m_memoryType, m_name, m_parameters
 
Constructor Summary
MethodInterceptorAdvice()
           
 
Method Summary
 java.lang.Object execute(org.codehaus.aspectwerkz.joinpoint.JoinPoint joinPoint)
          The template method from the superclass which contains all the logic for this advice.
 
Methods inherited from class org.codehaus.aspectwerkz.xmldef.advice.AroundAdvice
doExecute
 
Methods inherited from class org.codehaus.aspectwerkz.xmldef.advice.AbstractAdvice
getAdviceClass, getContainer, getDeploymentModel, getMemoryType, getName, getParameter, getParameters, getPerClassAdvice, getPerInstanceAdvice, getPerJvmAdvice, getPerThreadAdvice, getSystem, newInstance, setAdviceClass, setContainer, setDeploymentModel, setName, setParameter, setParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodInterceptorAdvice

public MethodInterceptorAdvice()
Method Detail

execute

public java.lang.Object execute(org.codehaus.aspectwerkz.joinpoint.JoinPoint joinPoint)
                         throws java.lang.Throwable
The template method from the superclass which contains all the logic for this advice.

Parameters:
joinPoint - the JoinPoint passed by AspectWerkz
Returns:
Either an overridden return value, or the return value provided by the method which was allowed to proceed.
Throws:
java.lang.Throwable - prerecorded exception which should be thrown in response to a matching call.


Copyright © 2003-2005 Virtual Mock. All Rights Reserved.