jodd-madvoc/src/main/java/jodd/madvoc/WebApp.java
public <T> WebApp withRegisteredComponent(final Class<T> madvocComponent, final Consumer<T> componentConsumer) {
		if (componentConfigs == null) {
			// component is already configured
			final T component = madvocContainer.lookupComponent(madvocComponent);
			if (component == null) {
				throw new MadvocException("Component not found: " + madvocComponent.getName());
			}
			componentConsumer.accept(component);
		}
		else {
			componentConfigs.add(madvocContainer -> {
				final T component = madvocContainer.lookupComponent(madvocComponent);
				if (component == null) {
					throw new MadvocException("Component not found: " + madvocComponent.getName());
				}
				componentConsumer.accept(component);
			});
		}
		return this;
	}
public <T> WebApp withRegisteredComponent(final Class<T> madvocComponent, final Consumer<T> componentConsumer) {
		if (componentConfigs == null) {
			// component is already configured
			final T component = madvocContainer.lookupComponent(madvocComponent);
			if (component == null) {
				throw new MadvocException("Component not found: " + madvocComponent.getName());
			}
			componentConsumer.accept(component);
		}
		else {
			componentConfigs.add(madvocContainer -> {
				final T component = madvocContainer.lookupComponent(madvocComponent);
				if (component == null) {
					throw new MadvocException("Component not found: " + madvocComponent.getName());
				}
				componentConsumer.accept(component);
			});
		}
		return this;
	}
Configures a component. While the signature is the same as for {@link #registerComponent(Class, Consumer)}
this method does not register component, just operates on an already registered one.