jamesnetherton commented on issue #7589:
URL: https://github.com/apache/camel-quarkus/issues/7589#issuecomment-3155835048
Actually, now that I've collected my thoughts a bit more....
This pattern is quite common in our extensions:
```java
@BuildStep
IndexDependencyBuildItem index() {
return new IndexDependencyBuildItem("org.foo", "foo");
}
@BuildStep
ReflectiveClassBuildItem reflectiveClass(CombinedIndexBuildItem
combinedIndex) {
Set<String> reflectiveClasses = combinedIndex.getIndex()
.getAllKnownSubclasses(Foo.class)
.stream()
.map(ClassInfo::name)
.map(DotName::toString)
.collect(Collectors.toSet());
return ReflectiveClassBuildItem
.builder(reflectiveClasses.toArray(new String[0]))
.build();
}
```
The `index` step would still run in JVM mode even though we only need it for
the `reflectiveClass` step.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]