Package org.mockito.internal.invocation
Class DefaultInvocationFactory
- java.lang.Object
-
- org.mockito.internal.invocation.DefaultInvocationFactory
-
- All Implemented Interfaces:
InvocationFactory
public class DefaultInvocationFactory extends java.lang.Object implements InvocationFactory
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.mockito.invocation.InvocationFactory
InvocationFactory.RealMethodBehavior<R>
-
-
Constructor Summary
Constructors Constructor Description DefaultInvocationFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static InterceptedInvocationcreateInvocation(java.lang.Object mock, java.lang.reflect.Method invokedMethod, java.lang.Object[] arguments, RealMethod realMethod, MockCreationSettings settings)static InterceptedInvocationcreateInvocation(java.lang.Object mock, java.lang.reflect.Method invokedMethod, java.lang.Object[] arguments, RealMethod realMethod, MockCreationSettings settings, Location location)InvocationcreateInvocation(java.lang.Object target, MockCreationSettings settings, java.lang.reflect.Method method, java.util.concurrent.Callable realMethod, java.lang.Object... args)private InvocationcreateInvocation(java.lang.Object target, MockCreationSettings settings, java.lang.reflect.Method method, RealMethod superMethod, java.lang.Object[] args)InvocationcreateInvocation(java.lang.Object target, MockCreationSettings settings, java.lang.reflect.Method method, InvocationFactory.RealMethodBehavior realMethod, java.lang.Object... args)Creates instance of anInvocationobject.private static MockitoMethodcreateMockitoMethod(java.lang.reflect.Method method, MockCreationSettings settings)
-
-
-
Method Detail
-
createInvocation
public Invocation createInvocation(java.lang.Object target, MockCreationSettings settings, java.lang.reflect.Method method, java.util.concurrent.Callable realMethod, java.lang.Object... args)
-
createInvocation
public Invocation createInvocation(java.lang.Object target, MockCreationSettings settings, java.lang.reflect.Method method, InvocationFactory.RealMethodBehavior realMethod, java.lang.Object... args)
Description copied from interface:InvocationFactoryCreates instance of anInvocationobject. This method is useful for framework integrators to programmatically simulate method calls on mocks usingMockHandler. It enables advanced framework integrations.- Specified by:
createInvocationin interfaceInvocationFactory- Parameters:
target- the mock object the method is invoked on.settings- creation settings of the mock object.method- java method invoked on mock.realMethod- real method behavior. Needed for spying / invoking real behavior on mock objects.args- the java method arguments- Returns:
- invocation instance
-
createInvocation
private Invocation createInvocation(java.lang.Object target, MockCreationSettings settings, java.lang.reflect.Method method, RealMethod superMethod, java.lang.Object[] args)
-
createInvocation
public static InterceptedInvocation createInvocation(java.lang.Object mock, java.lang.reflect.Method invokedMethod, java.lang.Object[] arguments, RealMethod realMethod, MockCreationSettings settings, Location location)
-
createInvocation
private static InterceptedInvocation createInvocation(java.lang.Object mock, java.lang.reflect.Method invokedMethod, java.lang.Object[] arguments, RealMethod realMethod, MockCreationSettings settings)
-
createMockitoMethod
private static MockitoMethod createMockitoMethod(java.lang.reflect.Method method, MockCreationSettings settings)
-
-