KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jfun > yan > PropertiesInjector


1 package jfun.yan;
2
3 import java.io.Serializable JavaDoc;
4
5 /**
6  * <p>
7  * Represents the logic that pulls property values
8  * from a Dependency object and inject them into
9  * the appropriate properties.
10  * </p>
11  * <p>
12  * A typical implementation may use java.beans package to do introspection.
13  * Yet, it is also possible to use any other naming convention, such as "injectAge"
14  * for property "age", or use the "age" field directly.
15  * </p>
16  * @author Ben Yu
17  * Dec 16, 2005 1:08:50 PM
18  */

19 public interface PropertiesInjector extends Serializable JavaDoc{
20   /**
21    * Pull property values and inject to the object.
22    * @param obj the object to inject properties to.
23    * @param dep the dependency to pull property values form.
24    */

25   void injectProperties(Object JavaDoc obj, Dependency dep);
26   /**
27    * Verify that all required properties are resolveable.
28    * @param type the type that has the properties.
29    * @param dep the dependency to resolve properties.
30    */

31   void verifyProperties(Class JavaDoc type, Dependency dep);
32 }
33
Popular Tags