X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=wicket%2Fjoe%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fwicket%2Finject%2FComponentInstantiationInjector.java;h=cdda947daf8d3b4e8ab348e6a325605f499360d7;hb=fb9750bc8475eb0c6c9525133e5e9b2aac18fadb;hp=a4a0dcf96b4bbbac73a01581ffe8192bf78e3e08;hpb=8dd86c184cd38644e94fb34f7cd9dc20d4e82f67;p=utils diff --git a/wicket/joe/src/main/java/org/wamblee/wicket/inject/ComponentInstantiationInjector.java b/wicket/joe/src/main/java/org/wamblee/wicket/inject/ComponentInstantiationInjector.java index a4a0dcf9..cdda947d 100644 --- a/wicket/joe/src/main/java/org/wamblee/wicket/inject/ComponentInstantiationInjector.java +++ b/wicket/joe/src/main/java/org/wamblee/wicket/inject/ComponentInstantiationInjector.java @@ -23,39 +23,40 @@ import org.wamblee.inject.SimpleInjector; /** *

- * Component instantiation listener that injects references into a component - * using the injector mini-framework. Together with an implementation of the + * Component instantiation listener that injects references into a component + * using the injector mini-framework. Together with an implementation of the * mini-framework, Contexts and Dependency Injection support can be provided or - * for standard Java EE injection into components. Or, other injection + * for standard Java EE injection into components. Or, other injection * frameworks can be used. *

* *

- * To use this injector override {@link WebApplication#init()} and add the - * listener: + * To use this injector override {@link WebApplication#init()} and add the + * listener: *

+ * *
- *    @Override
- *    protected void init() {
- *       super.init();
- *       addComponentInstantiationListener(new ComponentInstantiationInjector());
- *    }
+ * @Override
+ * protected void init() {
+ *     super.init();
+ *     addComponentInstantiationListener(new ComponentInstantiationInjector());
+ * }
  * 
* * @author Erik Brakkee */ public class ComponentInstantiationInjector implements - IComponentInstantiationListener { - - private SimpleInjector injector; - + IComponentInstantiationListener { + + private SimpleInjector injector; + /** - * Constructs the component instantiation listener. + * Constructs the component instantiation listener. */ - public ComponentInstantiationInjector() { + public ComponentInstantiationInjector() { injector = new SimpleInjector(InjectorBuilder.getInjectorFactory()); } - + @Override public void onInstantiation(Component aComponent) { injector.inject(aComponent);