2 * Copyright (c) 2018 Red Hat, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.infrautils.inject.guice;
11 * Guice Module with classpath scanning based autowiring.
13 * @author Michael Vorburger.ch
15 public class AutoWiringModule extends AbstractCheckedModule {
17 protected final GuiceClassPathBinder classPathBinder;
18 private final String packagePrefix;
20 public AutoWiringModule(GuiceClassPathBinder classPathBinder, String packagePrefix) {
21 this.classPathBinder = classPathBinder;
22 this.packagePrefix = packagePrefix;
26 protected final void checkedConfigure() throws Exception {
27 classPathBinder.bindAllSingletons(packagePrefix, binder());
31 protected void configureMore() throws Exception {