Search in sources :

Example 1 with AbstractConfigurationAwareModule

use of com.facebook.airlift.configuration.AbstractConfigurationAwareModule in project presto by prestodb.

the class ConfigurationAwareModules method combine.

public static Module combine(Module... modules) {
    checkArgument(modules.length > 0, "No modules given");
    if (modules.length == 1) {
        return modules[0];
    }
    return new AbstractConfigurationAwareModule() {

        @Override
        protected void setup(Binder binder) {
            for (Module module : modules) {
                requireNonNull(module, "module is null");
                install(module);
            }
        }
    };
}
Also used : Binder(com.google.inject.Binder) AbstractConfigurationAwareModule(com.facebook.airlift.configuration.AbstractConfigurationAwareModule) Module(com.google.inject.Module) AbstractConfigurationAwareModule(com.facebook.airlift.configuration.AbstractConfigurationAwareModule)

Aggregations

AbstractConfigurationAwareModule (com.facebook.airlift.configuration.AbstractConfigurationAwareModule)1 Binder (com.google.inject.Binder)1 Module (com.google.inject.Module)1