in impl/src/main/java/org/apache/geronimo/config/cdi/ConfigExtension.java [111:147]
public void registerConfigProducer(@Observes AfterBeanDiscovery abd, BeanManager bm) {
Set<Type> types = injectionPoints.stream()
.filter(NOT_PROVIDERS)
.map(ip -> REPLACED_TYPES.getOrDefault(ip.getType(), ip.getType()))
.collect(Collectors.toSet());
Set<Type> providerTypes = injectionPoints.stream()
.filter(NOT_PROVIDERS.negate())
.map(ip -> ((ParameterizedType)ip.getType()).getActualTypeArguments()[0])
.collect(Collectors.toSet());
types.addAll(providerTypes);
types.stream()
.peek(type -> {
if (type == Config.class) {
hasConfigProxy = true;
}
})
.map(type -> new ConfigInjectionBean(bm, type))
.forEach(abd::addBean);
validProxies = proxies.stream()
.filter(this::isValidProxy)
.collect(toList());
if (validProxies.size() == proxies.size()) {
proxyBeans = validProxies.stream()
.map((Function<Class<?>, ? extends ProxyBean<?>>) ProxyBean::new)
.collect(toList());
proxyBeans.forEach(abd::addBean);
} // else there are errors
if (!hasConfigProxy) {
configBean = new ConfigBean();
abd.addBean(configBean);
}
}