Class InvocationInfo
- java.lang.Object
-
- org.mockito.internal.stubbing.answers.InvocationInfo
-
- All Implemented Interfaces:
AbstractAwareMethod
public class InvocationInfo extends java.lang.Object implements AbstractAwareMethod
-
-
Field Summary
Fields Modifier and Type Field Description private InvocationOnMock
invocation
private java.lang.reflect.Method
method
-
Constructor Summary
Constructors Constructor Description InvocationInfo(InvocationOnMock theInvocation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.reflect.Method
getMethod()
java.lang.String
getMethodName()
boolean
isAbstract()
boolean
isDeclaredOnInterface()
private boolean
isValidException(java.lang.reflect.Method method, java.lang.Throwable throwable)
boolean
isValidException(java.lang.Throwable throwable)
private boolean
isValidExceptionForClass(java.lang.Class<?> parent, java.lang.Throwable throwable)
private boolean
isValidExceptionForParents(java.lang.Class<?> parent, java.lang.Throwable throwable)
boolean
isValidReturnType(java.lang.Class<?> clazz)
boolean
isVoid()
Returnstrue
is the return type isVoid
or represents the pseudo-type to the keywordvoid
.java.lang.String
printMethodReturnType()
boolean
returnsPrimitive()
-
-
-
Field Detail
-
method
private final java.lang.reflect.Method method
-
invocation
private final InvocationOnMock invocation
-
-
Constructor Detail
-
InvocationInfo
public InvocationInfo(InvocationOnMock theInvocation)
-
-
Method Detail
-
isValidException
public boolean isValidException(java.lang.Throwable throwable)
-
isValidExceptionForParents
private boolean isValidExceptionForParents(java.lang.Class<?> parent, java.lang.Throwable throwable)
-
isValidExceptionForClass
private boolean isValidExceptionForClass(java.lang.Class<?> parent, java.lang.Throwable throwable)
-
isValidException
private boolean isValidException(java.lang.reflect.Method method, java.lang.Throwable throwable)
-
isValidReturnType
public boolean isValidReturnType(java.lang.Class<?> clazz)
-
isVoid
public boolean isVoid()
Returnstrue
is the return type isVoid
or represents the pseudo-type to the keywordvoid
. E.g:void foo()
orVoid bar()
-
printMethodReturnType
public java.lang.String printMethodReturnType()
-
getMethodName
public java.lang.String getMethodName()
-
returnsPrimitive
public boolean returnsPrimitive()
-
getMethod
public java.lang.reflect.Method getMethod()
-
isDeclaredOnInterface
public boolean isDeclaredOnInterface()
-
isAbstract
public boolean isAbstract()
- Specified by:
isAbstract
in interfaceAbstractAwareMethod
-
-