org.equilibriums.aop.utils.interceptor.stub
Class StubWithReturnValueInterceptor

java.lang.Object
  extended by org.equilibriums.aop.utils.interceptor.stub.StubWithReturnValueInterceptor
All Implemented Interfaces:
org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor

public class StubWithReturnValueInterceptor
extends Object
implements org.aopalliance.intercept.MethodInterceptor

Will intercept a method call and follow rules defined below without calling target method (wont call invocation.proceed() ).

For more on how to use this interceptor see Overview section of this Javadoc.

Author:
Tsolak Petrosian

Constructor Summary
StubWithReturnValueInterceptor()
           
 
Method Summary
 Object getReturnValue()
           
 Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
           
 boolean isCheckReturnValueType()
           
 void setCheckReturnValueType(boolean checkReturnValueType)
           
 void setReturnValue(Object returnValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StubWithReturnValueInterceptor

public StubWithReturnValueInterceptor()
Method Detail

getReturnValue

public Object getReturnValue()

setReturnValue

public void setReturnValue(Object returnValue)

isCheckReturnValueType

public boolean isCheckReturnValueType()

setCheckReturnValueType

public void setCheckReturnValueType(boolean checkReturnValueType)

invoke

public Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
              throws Throwable
Specified by:
invoke in interface org.aopalliance.intercept.MethodInterceptor
Throws:
Throwable


Copyright © 2011. All Rights Reserved.