private Collection<ComponentNode> osgiComponentsOfClass(Class<?> clazz) {
        return componentNodes().stream().filter(node -> clazz.isAssignableFrom(node.componentType())).toList();
    }
@author Tony Vaagenes
@author gjoranv
@author ollivir

Not thread safe.
container-core/src/main/java/com/yahoo/container/di/componentgraph/core/ComponentGraph.java