org.powermock.api.support.membermodification.strategy.impl
Class MethodReplaceStrategyImpl

java.lang.Object
  extended by org.powermock.api.support.membermodification.strategy.impl.MethodReplaceStrategyImpl
All Implemented Interfaces:
MethodReplaceStrategy

public class MethodReplaceStrategyImpl
extends Object
implements MethodReplaceStrategy


Constructor Summary
MethodReplaceStrategyImpl(Method 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodReplaceStrategyImpl

public MethodReplaceStrategyImpl(Method method)
Method Detail

with

public void with(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 interface MethodReplaceStrategy
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: MethodReplaceStrategy
Replaces the method invocation with an invocation handler

Specified by:
with in interface MethodReplaceStrategy
Parameters:
invocationHandler - The invocation handler to replace the method call with.


Copyright © 2007-2012. All Rights Reserved.