KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jfun > yan > Part


1 /*****************************************************************************
2  * Copyright (C) Codehaus.org. All rights reserved. *
3  * ------------------------------------------------------------------------- *
4  * The software in this package is published under the terms of the BSD *
5  * style license a copy of which has been included with this distribution in *
6  * the LICENSE.txt file. *
7  *****************************************************************************/

8 /*
9  * Created on Mar 17, 2005
10  *
11  * Author Ben Yu
12  * ZBS
13  */

14 package jfun.yan;
15
16 /**
17  * A Part object encapsulates creation and verification logic for
18  * any property or parameter of a component.
19  * Part is used to customize the creation of a parameters or properties
20  * without regard to the parameter orginal position or property name.
21  * <p>
22  * Codehaus.org.
23  *
24  * @author Ben Yu
25  *
26  */

27 public interface Part extends java.io.Serializable JavaDoc{
28   /**
29    * Creates a part instance.
30    * @param type the type of the part.
31    * @param pp the Dependency object used to resolve any dependency.
32    * @return the part instance.
33    */

34   Object JavaDoc create(Class JavaDoc type, Dependency pp);
35   /**
36    * Verifies that the part can be satisfied.
37    * @param type the type of the part.
38    * @param pp the Dependency object used to resolve any dependency.
39    * @return the type of the part instance.
40    */

41   Class JavaDoc verify(Class JavaDoc type, Dependency pp);
42 }
43
Popular Tags