Merge branch 'master' of ../infrautils
[odlguice.git] / inject-guice-testutils / src / main / java / org / opendaylight / infrautils / inject / guice / testutils / AnnotationsModule.java
diff --git a/inject-guice-testutils/src/main/java/org/opendaylight/infrautils/inject/guice/testutils/AnnotationsModule.java b/inject-guice-testutils/src/main/java/org/opendaylight/infrautils/inject/guice/testutils/AnnotationsModule.java
new file mode 100644 (file)
index 0000000..8c24ccd
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2017 Red Hat, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.infrautils.inject.guice.testutils;
+
+import com.google.inject.AbstractModule;
+import com.mycila.guice.ext.closeable.CloseableModule;
+import com.mycila.guice.ext.jsr250.Jsr250Module;
+
+/**
+ * Guice module with built-in Mycila Guice Extensions for JSR-250 &
+ * Closeable support for {@literal @}PreDestroy & {@literal @}PostConstruct.
+ *
+ * @author Michael Vorburger.ch
+ */
+public class AnnotationsModule extends AbstractModule {
+
+    @Override
+    protected void configure() {
+        install(new CloseableModule());
+        install(new Jsr250Module());
+    }
+
+}