private void initialize(Object... m) {
        for (Object o : m) {
            DependsOnComponents annotation = o.getClass().getAnnotation(DependsOnComponents.class);
            if (annotation != null) {
                Class<? extends IComponent>[] value = annotation.value();
                for (Class<? extends IComponent> componentClass : value) {
                    Method setter = ReflectionUtils.findSetter(o.getClass(), componentClass);
                    if (setter != null) {
                        IComponent component = componentRegistry.getComponent(componentClass);
                        try {
                            setter.invoke(o, new Object[] { component });
                        } catch (IllegalAccessException | IllegalArgumentException
                                | InvocationTargetException e) {
                            throw new RuntimeException(e);
                        }
                    }
                }
            }
            if (o instanceof IRequiresInitialization) {
                ((IRequiresInitialization) o).initialize();
            }
            // Make sure to also initialize all components!
            if (o instanceof IComponentRegistry) {
                Collection<IComponent> components = ((IComponentRegistry) o).getComponents();
                for (IComponent component : components) {
                    initialize(component);
                }
            }
        }
    }
@param metrics the metrics to set
gateway/engine/core/src/main/java/io/apiman/gateway/engine/impl/EngineImpl.java