KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jfun > yan > ComponentBinder


1 /*****************************************************************************
2  * Copyright (C) Zephyr Business Solution. 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 /*
10  * Created on Apr 10, 2005
11  *
12  * Author Ben Yu
13  * ZBS
14  */

15 package jfun.yan;
16
17 /**
18  * In addition to mapping the previous result to a new Creator,
19  * ComponentBinder also verifies the type of the previous result.
20  * <br>
21  * Implement this interface if you want to do static-verification.
22  * <p>
23  * Zephyr Business Solution
24  *
25  * @author Ben Yu
26  *
27  */

28 public interface ComponentBinder<From,To> extends Binder<From,To>, java.io.Serializable JavaDoc{
29   /**
30    * Get a Verifiable object that's responsible for verifying
31    * the component being bound.
32    * @param type the type of the previous component. It cannot be null.
33    * @return the Verifiable object.
34    */

35   Verifiable verify(Class JavaDoc<From> type);
36   /**
37    * Get the type of the component being bound.
38    * @param type the type of the previous component, it can be null.
39    * @return the type.
40    */

41   Class JavaDoc bindType(Class JavaDoc type);
42 }
43
Popular Tags