GrapheneContext context = GrapheneContext.getContextFor(ReflectionHelper.getQualifier(annotations));
return context.getWebDriver(mediatorType);
}
};
GrapheneProxyHandler mediatorHandler = new GrapheneProxyHandler(futureTarget) {
@Override
public Object invoke(Object proxy, final Method mediatorMethod, final Object[] mediatorArgs) throws Throwable {
GrapheneProxyHandler handler = new GrapheneProxyHandler(futureTarget) {
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
Object mediatorObject = mediatorMethod.invoke(getTarget(), mediatorArgs);
return method.invoke(mediatorObject, args);