KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jfun > yan > xml > nuts > optional > InjectionNut


1 package jfun.yan.xml.nuts.optional;
2
3 import jfun.yan.Component;
4 import jfun.yan.etc.injection.Injection;
5 import jfun.yan.etc.injection.InjectionUtils;
6 import jfun.yan.xml.nuts.FactoryNut;
7
8 /**
9  * Uses any component to create an {@link Injection} instance.
10  * <p>
11  * @author Ben Yu
12  * Dec 15, 2005 9:09:40 PM
13  */

14 public class InjectionNut extends FactoryNut {
15   public InjectionNut(){
16     super.setType(Injection.class);
17   }
18   protected void delegateTo(Component c){
19     super.delegateTo(InjectionUtils.returnTrue(c));
20   }
21 }
22
Popular Tags