Class MethodReplaceStrategyImpl
- java.lang.Object
-
- org.powermock.api.support.membermodification.strategy.impl.MethodReplaceStrategyImpl
-
- All Implemented Interfaces:
MethodReplaceStrategy
public class MethodReplaceStrategyImpl extends java.lang.Object implements MethodReplaceStrategy
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
MethodReplaceStrategyImpl.MethodInvocationHandler
-
Field Summary
Fields Modifier and Type Field Description private java.lang.reflect.Method
method
-
Constructor Summary
Constructors Constructor Description MethodReplaceStrategyImpl(java.lang.reflect.Method method)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
with(java.lang.reflect.InvocationHandler invocationHandler)
Replaces the method invocation with an invocation handlervoid
with(java.lang.reflect.Method method)
Replaces the method invocation with this method.
-
-
-
Method Detail
-
with
public void with(java.lang.reflect.Method method)
Description copied from interface:MethodReplaceStrategy
Replaces the method invocation with this method.Note that both methods needs to be static.
- Specified by:
with
in interfaceMethodReplaceStrategy
- Parameters:
method
- The method call will be replaced by this method instead. Needs to be static.
-
with
public void with(java.lang.reflect.InvocationHandler invocationHandler)
Description copied from interface:MethodReplaceStrategy
Replaces the method invocation with an invocation handler- Specified by:
with
in interfaceMethodReplaceStrategy
- Parameters:
invocationHandler
- The invocation handler to replace the method call with.
-
-