@Override
    public <C extends Document & HasEnabled> BUILDER with(
        final Class<C> type,
        final String name,
        final BiConsumer<Injector, C> consumer
    ) {
        requireNonNull(type);
        requireNonNull(name);
        requireNonNull(consumer);

        injectorBuilder.before(resolved(ProjectComponent.class)
            .withStateInitialized(Injector.class)
            .withExecute((projComp, injector) -> 
                DocumentDbUtil.traverseOver(projComp.getProject(), type)
                    .filter(doc -> DocumentUtil.relativeName(
                        HasName.of(doc), 
                        Dbms.class, 
                        DATABASE_NAME
                    ).equals(name))
                    .forEach(doc -> consumer.accept(injector, doc))
            )
        );
        
        return self();
    }
This abstract class is implemented by classes that can build a
{@link Speedment} application.

@param <APP> the type that is being built
@param <BUILDER> the (self) type of the AbstractApplicationBuilder

@author Per Minborg
@author Emil Forslund
@since 2.0.0
runtime-parent/runtime-application/src/main/java/com/speedment/runtime/application/AbstractApplicationBuilder.java