// Path: core-installer-custom/src/main/java/ru/vyarus/dropwizard/guice/examples/installer/MarkersInstaller.java
// public class MarkersInstaller implements FeatureInstaller, InstanceInstaller<Marker> {
// 
//     private final Reporter reporter = new Reporter(MarkersInstaller.class, "Installed markers = ");
// 
//     @Override
//     public boolean matches(Class<?> type) {
//         // recognize classes implementing interface
//         return FeatureUtils.is(type, Marker.class);
//     }
// 
//     @Override
//     public void install(Environment environment, Marker instance) {
//         // register instance in guice bean
//         InjectorLookup.getInstance(environment, MarkersCollector.class).get().register(instance);
//         // register instance for console report
//         reporter.line(RenderUtils.renderClass(instance.getClass()));
//     }
// 
//     @Override
//     public void report() {
//         // report all markers to console
//         reporter.report();
//     }
// }
// 
// Path: core-installer-custom/src/main/java/ru/vyarus/dropwizard/guice/examples/service/SampleMarker.java
// @Singleton
// public class SampleMarker implements Marker {
// }


import io.dropwizard.Application;
import io.dropwizard.Configuration;
import io.dropwizard.setup.Bootstrap;
import io.dropwizard.setup.Environment;
import ru.vyarus.dropwizard.guice.GuiceBundle;
import ru.vyarus.dropwizard.guice.examples.installer.MarkersInstaller;
import ru.vyarus.dropwizard.guice.examples.service.SampleMarker;
package ru.vyarus.dropwizard.guice.examples;


/**
 * Sample application for custom installer in manual config mode.
 *
 * @author Vyacheslav Rusakov
 * @since 29.01.2016
 */
public class CustomInstallerApplication extends Application<Configuration> {

    @Override
    public void initialize(Bootstrap<Configuration> bootstrap) {
        bootstrap.addBundle(GuiceBundle.builder()
                .installers(MarkersInstaller.class)
                .extensions(SampleMarker.class)
                // to show that marker was installed by custom installer
                .printDiagnosticInfo()
                .build());
    }

// Path: core-installer-custom/src/main/java/ru/vyarus/dropwizard/guice/examples/installer/MarkersInstaller.java
// public class MarkersInstaller implements FeatureInstaller, InstanceInstaller<Marker> {
// 
//     private final Reporter reporter = new Reporter(MarkersInstaller.class, "Installed markers = ");
// 
//     @Override
//     public boolean matches(Class<?> type) {
//         // recognize classes implementing interface
//         return FeatureUtils.is(type, Marker.class);
//     }
// 
//     @Override
//     public void install(Environment environment, Marker instance) {
//         // register instance in guice bean
//         InjectorLookup.getInstance(environment, MarkersCollector.class).get().register(instance);
//         // register instance for console report
//         reporter.line(RenderUtils.renderClass(instance.getClass()));
//     }
// 
//     @Override
//     public void report() {
//         // report all markers to console
//         reporter.report();
//     }
// }
// 
// Path: core-installer-custom/src/main/java/ru/vyarus/dropwizard/guice/examples/service/SampleMarker.java
// @Singleton
// public class SampleMarker implements Marker {
// }


// Path: core-installer-custom/src/main/java/ru/vyarus/dropwizard/guice/examples/CustomInstallerApplication.java
import io.dropwizard.Application;
import io.dropwizard.Configuration;
import io.dropwizard.setup.Bootstrap;
import io.dropwizard.setup.Environment;
import ru.vyarus.dropwizard.guice.GuiceBundle;
import ru.vyarus.dropwizard.guice.examples.installer.MarkersInstaller;
import ru.vyarus.dropwizard.guice.examples.service.SampleMarker;

package ru.vyarus.dropwizard.guice.examples;


/**
 * Sample application for custom installer in manual config mode.
 *
 * @author Vyacheslav Rusakov
 * @since 29.01.2016
 */
public class CustomInstallerApplication extends Application<Configuration> {

    @Override
    public void initialize(Bootstrap<Configuration> bootstrap) {
        bootstrap.addBundle(GuiceBundle.builder()
                .installers(MarkersInstaller.class)
                .extensions(SampleMarker.class)
                // to show that marker was installed by custom installer
                .printDiagnosticInfo()
                .build());
    }

    @Override