Proxy.newProxyInstance(classLoader, new Class[]{handlerClass}, new InvocationHandler() {
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
if (method.getName().equals("handle")) {
String path = (String) args[0];
Object object = args[1];
XmlObjectInfo objectInfo = m_pathToModelMap.get(path);
objectInfo.setObject(object);
}
if (method.getName().equals("provideFactory")) {
Class<?> factoryType = (Class<?>) args[0];
String methodName = (String) args[1];
Object[] factoryArgs = (Object[]) args[2];