Index: src/com/google/gwt/inject/client/Ginjector.java |
=================================================================== |
--- src/com/google/gwt/inject/client/Ginjector.java (revision 135) |
+++ src/com/google/gwt/inject/client/Ginjector.java (working copy) |
@@ -53,4 +53,14 @@ |
* Note that this is not named "G-injector" -- its "GIN-jector." |
*/ |
public interface Ginjector { |
+ /** |
+ * An optional method to initialize eager singletons. This is automatically |
+ * called before any of constructor injector methods. If there is no instance bindings, |
+ * this is called from the injector constructor. When there is at least one instance |
+ * binding, this is called an all constructor injector methods if all the required instasnces |
+ * are set using instance setters (otherwise, an exception is generated in the constructor |
+ * injector method). This method may be called explicitly by the user of Ginjector after |
+ * instance initializations to ensure that all eager singletons are created. |
+ */ |
+ void initializeSingletons(); |
} |