Assert.notNull(this.serviceRegistry, "serviceRegistry cannot be null");
Assert.notNull(proxyTypes, "proxyTypes cannot be null");
Assert.notEmpty(proxyTypes, "proxyTypes cannot be empty");
//this will return a non-null value if single interface which is concrete class
ServiceEndpointTargetSource targetSource = new BeanRetrievingServiceRegistryTargetSource(this.serviceRegistry, registryBeanName, proxyTypes, exportTypesOnly);
ProxyFactory proxyFactory = new ProxyFactory();
if (targetSource.getTargetClass() == null) {
//not proxying by class, so proxy by interface
ProxyFactorySourceUtils.addInterfaces(proxyFactory, proxyTypes);
}
afterInit(proxyFactory, targetSource);