public class MockInterceptor extends AbstractInterceptor
MethodInterceptorです。| コンストラクタと説明 |
|---|
MockInterceptor()
MockInterceptorを作成します。 |
MockInterceptor(Object value)
MockInterceptorを作成します。 |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
Object[] |
getArgs(String methodName)
呼び出されたメソッドの引数を返します。
|
Object |
invoke(MethodInvocation invocation) |
boolean |
isInvoked(String methodName)
メソッドが呼び出されたどうかを返します。
|
void |
setReturnValue(Object returnValue)
デフォルトの戻り値を設定します。
|
void |
setReturnValue(String methodName,
Object returnValue)
指定したメソッドに対する戻り値を設定します。
|
void |
setThrowable(String methodName,
Throwable throwable)
指定したメソッドを呼び出したときに、 スローされる例外を設定します。
|
void |
setThrowable(Throwable throwable)
デフォルトでスローされる例外を設定します。
|
createProxy, getComponentDef, getTargetClasspublic MockInterceptor()
MockInterceptorを作成します。public MockInterceptor(Object value)
MockInterceptorを作成します。value - public void setReturnValue(Object returnValue)
returnValue - public void setReturnValue(String methodName, Object returnValue)
methodName - returnValue - public void setThrowable(Throwable throwable)
throwable - public void setThrowable(String methodName, Throwable throwable)
methodName - throwable - public boolean isInvoked(String methodName)
methodName - public Object invoke(MethodInvocation invocation) throws Throwable
Throwableorg.aopalliance.intercept.MethodInterceptor#invoke(org.aopalliance.intercept.MethodInvocation)Copyright © 2015 The DBFlute Project. All rights reserved.