Search in sources :

Example 1 with Callback

use of org.powermock.api.mockito.repackaged.cglib.proxy.Callback in project powermock by powermock.

the class CglibMockMaker method getHandler.

public MockHandler getHandler(Object mock) {
    if (!(mock instanceof Factory)) {
        return null;
    }
    Factory factory = (Factory) mock;
    Callback callback = factory.getCallback(0);
    if (!(callback instanceof MethodInterceptorFilter)) {
        return null;
    }
    return ((MethodInterceptorFilter) callback).getHandler();
}
Also used : Callback(org.powermock.api.mockito.repackaged.cglib.proxy.Callback) Factory(org.powermock.api.mockito.repackaged.cglib.proxy.Factory)

Aggregations

Callback (org.powermock.api.mockito.repackaged.cglib.proxy.Callback)1 Factory (org.powermock.api.mockito.repackaged.cglib.proxy.Factory)1