use of org.apache.camel.quarkus.core.deployment.spi.CamelComponentNameResolverBuildItem in project camel-quarkus by apache.
the class CamelProcessor method componentNameResolver.
@Record(ExecutionTime.STATIC_INIT)
@BuildStep
CamelComponentNameResolverBuildItem componentNameResolver(BuildTimeCamelCatalogBuildItem camelCatalog, CamelRecorder recorder) {
BuildTimeCamelCatalog catalog = camelCatalog.getCatalog();
BuildTimeJsonSchemaResolver jSonSchemaResolver = catalog.getJSonSchemaResolver();
Set<String> componentNames = jSonSchemaResolver.getSchemaResources().stream().filter(resource -> resource.getType().equals("component")).map(SchemaResource::getName).collect(Collectors.collectingAndThen(Collectors.toUnmodifiableSet(), TreeSet::new));
return new CamelComponentNameResolverBuildItem(recorder.createComponentNameResolver(componentNames));
}
Aggregations