Use dependency injection to create Sone instance.
[Sone.git] / src / main / java / net / pterodactylus / sone / core / FreenetInterface.java
index 3348e88..4e8b49a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Sone - FreenetInterface.java - Copyright © 2010 David Roden
+ * Sone - FreenetInterface.java - Copyright © 2010–2012 David Roden
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -33,6 +33,7 @@ import net.pterodactylus.util.collection.Pair;
 import net.pterodactylus.util.logging.Logging;
 
 import com.db4o.ObjectContainer;
+import com.google.inject.Inject;
 
 import freenet.client.ClientMetadata;
 import freenet.client.FetchException;
@@ -83,6 +84,7 @@ public class FreenetInterface {
         * @param node
         *            The node to interact with
         */
+       @Inject
        public FreenetInterface(Node node) {
                this.node = node;
                this.client = node.clientCore.makeClient(RequestStarter.INTERACTIVE_PRIORITY_CLASS, false, true);