return indices.get(method);
}
});
enhancer.setCallbackTypes(callbackTypes);
enhancer.setUseFactory(false);
enhancer.setNamingPolicy(new GuiceNamingPolicy());
Class<?> proxied = enhancer.createClass();
// Store callbacks.
Enhancer.registerStaticCallbacks(proxied, callbacks);