KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jfun > yan > xml > WiringMode


1 package jfun.yan.xml;
2
3 import jfun.yan.ParameterBinder;
4 import jfun.yan.PropertyBinder;
5
6 /**
7  * The wiring mode for the components in a module.
8  * <p>
9  * @author Ben Yu
10  * Nov 16, 2005 10:36:35 AM
11  */

12 final class WiringMode implements java.io.Serializable JavaDoc {
13   private final ParameterBinder param_wiring;
14   private final PropertyBinder prop_wiring;
15   private final SingletonMode singleton_mode;
16   
17   /**
18    * Create a WiringMode object.
19    * @param param_wiring the parameter auto wiring strategy. null for manual-wiring.
20    * @param prop_wiring the property auto wiring strategy. null for manual-wirng.
21    * @param singleton_mode the singleton strategy. null for non-singleton.
22    */

23   public WiringMode(ParameterBinder param_wiring, PropertyBinder prop_wiring,
24       SingletonMode singleton_mode) {
25     this.param_wiring = param_wiring;
26     this.prop_wiring = prop_wiring;
27     this.singleton_mode = singleton_mode;
28   }
29   /**
30    * Get the default parameter auto-wiring mode.
31    * Null is returned if manual-wiring is default.
32    */

33   public ParameterBinder getParameterWiring(){
34     return param_wiring;
35   }
36   /**
37    * Get the default property auto-wiring mode.
38    * Null is returned if manual-wiring is default.
39    */

40   public PropertyBinder getPropertyWiring(){
41     return prop_wiring;
42   }
43   /**
44    * Get the default singleton mode.
45    * Null is returned if singleton is disabled by default.
46    */

47   public SingletonMode getSingletonMode(){
48     return singleton_mode;
49   }
50 }
51
Popular Tags