org.powermock.api.support.membermodification.strategy
Interface MethodReplaceStrategy

All Known Implementing Classes:
MethodReplaceStrategyImpl

public interface MethodReplaceStrategy

Specifies the replace strategy for a method.


Method Summary
 void with(InvocationHandler invocationHandler)
          Replaces the method invocation with an invocation handler
 void with(Method method)
          Replaces the method invocation with this method.
 

Method Detail

with

void with(Method method)
Replaces the method invocation with this method.

Note that both methods needs to be static.

Parameters:
method - The method call will be replaced by this method instead. Needs to be static.

with

void with(InvocationHandler invocationHandler)
Replaces the method invocation with an invocation handler

Parameters:
invocationHandler - The invocation handler to replace the method call with.


Copyright © 2007-2012. All Rights Reserved.