// Path: graceland-platform/src/main/java/io/graceland/dropwizard/Configurator.java
// public interface Configurator {
// 
//     /**
//      * The method that will be called during the Dropwizard's {@link io.dropwizard.Application#run(io.dropwizard.Configuration, io.dropwizard.setup.Environment)}
//      * method.
//      *
//      * @param configuration Provided by Dropwizard.
//      * @param environment   Provided by Dropwizard.
//      */
//     void configure(PlatformConfiguration configuration, Environment environment);
// }
// 
// Path: graceland-platform/src/main/java/io/graceland/dropwizard/Initializer.java
// public interface Initializer {
// 
//     /**
//      * The method that will be called during the Dropwizard's {@link io.dropwizard.Application#initialize(io.dropwizard.setup.Bootstrap)}
//      * method.
//      *
//      * @param bootstrap Provided by Dropwizard.
//      */
//     void initialize(Bootstrap<PlatformConfiguration> bootstrap);
// }
// 
// Path: graceland-platform/src/main/java/io/graceland/filter/FilterSpec.java
// public class FilterSpec {
//     public static final Comparator<FilterSpec> PRIORITY_COMPARATOR = new Comparator<FilterSpec>() {
//         @Override
//         public int compare(FilterSpec o1, FilterSpec o2) {
//             return o1.getPriority() - o2.getPriority();
//         }
//     };
// 
//     private final Provider<? extends Filter> filterProvider;
//     private final int priority;
//     private final String name;
//     private final ImmutableList<FilterPattern> patterns;
// 
//     FilterSpec(
//             Provider<? extends Filter> filterProvider,
//             int priority,
//             String name,
//             ImmutableList<FilterPattern> patterns) {
// 
//         this.filterProvider = Preconditions.checkNotNull(filterProvider, "Filter Provider cannot be null.");
//         this.priority = Preconditions.checkNotNull(priority, "Priority cannot be null.");
//         this.name = Preconditions.checkNotNull(name, "Name cannot be null.");
//         this.patterns = Preconditions.checkNotNull(patterns, "Filter Patterns cannot be null.");
//     }
// 
//     public Filter getFilter() {
//         return filterProvider.get();
//     }
// 
//     /**
//      * The priority is used to determine the order of the filters added to the {@link io.dropwizard.setup.Environment}.
//      *
//      * @return The filter's priority.
//      */
//     public int getPriority() {
//         return priority;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public ImmutableList<FilterPattern> getPatterns() {
//         return patterns;
//     }
// }


import java.util.Set;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.codahale.metrics.health.HealthCheck;
import com.google.common.base.Preconditions;
import com.google.common.collect.FluentIterable;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.google.inject.ConfigurationException;
import com.google.inject.Injector;
import com.google.inject.Key;
import io.dropwizard.Bundle;
import io.dropwizard.cli.Command;
import io.dropwizard.lifecycle.Managed;
import io.dropwizard.servlets.tasks.Task;
import io.graceland.dropwizard.Configurator;
import io.graceland.dropwizard.Initializer;
import io.graceland.filter.FilterSpec;
        return getAndBuildInstances(Keys.HealthChecks, Keys.HealthCheckClasses);
    }

    public ImmutableSet<Task> getTasks() {
        return getAndBuildInstances(Keys.Tasks, Keys.TaskClasses);
    }

    public ImmutableSet<Managed> getManaged() {
        return getAndBuildInstances(Keys.ManagedObjects, Keys.ManagedObjectClasses);
    }

    public ImmutableSet<Bundle> getBundles() {
        return getAndBuildInstances(Keys.Bundles, Keys.BundleClasses);
    }

    public ImmutableSet<Command> getCommands() {
        return getAndBuildInstances(Keys.Commands, Keys.CommandClasses);
    }

    public ImmutableSet<Initializer> getInitializers() {
        return getAndBuildInstances(Keys.Initializers, Keys.InitializerClasses);
    }

    public ImmutableSet<Configurator> getConfigurators() {
        return getAndBuildInstances(Keys.Configurators, Keys.ConfiguratorClasses);
    }

    public ImmutableList<FilterSpec> getFilterSpecs() {
        return FluentIterable
                .from(getSetSafely(Keys.FilterSpecs))
// Path: graceland-platform/src/main/java/io/graceland/dropwizard/Configurator.java
// public interface Configurator {
// 
//     /**
//      * The method that will be called during the Dropwizard's {@link io.dropwizard.Application#run(io.dropwizard.Configuration, io.dropwizard.setup.Environment)}
//      * method.
//      *
//      * @param configuration Provided by Dropwizard.
//      * @param environment   Provided by Dropwizard.
//      */
//     void configure(PlatformConfiguration configuration, Environment environment);
// }
// 
// Path: graceland-platform/src/main/java/io/graceland/dropwizard/Initializer.java
// public interface Initializer {
// 
//     /**
//      * The method that will be called during the Dropwizard's {@link io.dropwizard.Application#initialize(io.dropwizard.setup.Bootstrap)}
//      * method.
//      *
//      * @param bootstrap Provided by Dropwizard.
//      */
//     void initialize(Bootstrap<PlatformConfiguration> bootstrap);
// }
// 
// Path: graceland-platform/src/main/java/io/graceland/filter/FilterSpec.java
// public class FilterSpec {
//     public static final Comparator<FilterSpec> PRIORITY_COMPARATOR = new Comparator<FilterSpec>() {
//         @Override
//         public int compare(FilterSpec o1, FilterSpec o2) {
//             return o1.getPriority() - o2.getPriority();
//         }
//     };
// 
//     private final Provider<? extends Filter> filterProvider;
//     private final int priority;
//     private final String name;
//     private final ImmutableList<FilterPattern> patterns;
// 
//     FilterSpec(
//             Provider<? extends Filter> filterProvider,
//             int priority,
//             String name,
//             ImmutableList<FilterPattern> patterns) {
// 
//         this.filterProvider = Preconditions.checkNotNull(filterProvider, "Filter Provider cannot be null.");
//         this.priority = Preconditions.checkNotNull(priority, "Priority cannot be null.");
//         this.name = Preconditions.checkNotNull(name, "Name cannot be null.");
//         this.patterns = Preconditions.checkNotNull(patterns, "Filter Patterns cannot be null.");
//     }
// 
//     public Filter getFilter() {
//         return filterProvider.get();
//     }
// 
//     /**
//      * The priority is used to determine the order of the filters added to the {@link io.dropwizard.setup.Environment}.
//      *
//      * @return The filter's priority.
//      */
//     public int getPriority() {
//         return priority;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public ImmutableList<FilterPattern> getPatterns() {
//         return patterns;
//     }
// }


// Path: graceland-platform/src/main/java/io/graceland/inject/InjectorWrapper.java
import java.util.Set;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.codahale.metrics.health.HealthCheck;
import com.google.common.base.Preconditions;
import com.google.common.collect.FluentIterable;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.google.inject.ConfigurationException;
import com.google.inject.Injector;
import com.google.inject.Key;
import io.dropwizard.Bundle;
import io.dropwizard.cli.Command;
import io.dropwizard.lifecycle.Managed;
import io.dropwizard.servlets.tasks.Task;
import io.graceland.dropwizard.Configurator;
import io.graceland.dropwizard.Initializer;
import io.graceland.filter.FilterSpec;

        return getAndBuildInstances(Keys.HealthChecks, Keys.HealthCheckClasses);
    }

    public ImmutableSet<Task> getTasks() {
        return getAndBuildInstances(Keys.Tasks, Keys.TaskClasses);
    }

    public ImmutableSet<Managed> getManaged() {
        return getAndBuildInstances(Keys.ManagedObjects, Keys.ManagedObjectClasses);
    }

    public ImmutableSet<Bundle> getBundles() {
        return getAndBuildInstances(Keys.Bundles, Keys.BundleClasses);
    }

    public ImmutableSet<Command> getCommands() {
        return getAndBuildInstances(Keys.Commands, Keys.CommandClasses);
    }

    public ImmutableSet<Initializer> getInitializers() {
        return getAndBuildInstances(Keys.Initializers, Keys.InitializerClasses);
    }

    public ImmutableSet<Configurator> getConfigurators() {
        return getAndBuildInstances(Keys.Configurators, Keys.ConfiguratorClasses);
    }

    public ImmutableList<FilterSpec> getFilterSpecs() {
        return FluentIterable
                .from(getSetSafely(Keys.FilterSpecs))
                .toSortedList(FilterSpec.PRIORITY_COMPARATOR);