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