private Connector createProxy(VirtualType handler, Collection<Class<?>> interfaces) {
Class<? extends Domain> domainInterface = domainProvider.getDomainInterface();
Set<Class<?>> classes = Sets.newHashSet(interfaces);
classes.add(domainInterface);
classes.add(Connector.class);
CompositeClassLoader compositeClassLoader = makeCompositeClassLoader(domainInterface, classes);
Class<?>[] classesAsArray = classes.toArray(new Class<?>[classes.size()]);
return (Connector) Proxy.newProxyInstance(compositeClassLoader, classesAsArray, handler);
}