KickJava   Java API By Example, From Geeks To Geeks.

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


1 package jfun.yan.xml.nuts.optional;
2
3 import jfun.yan.Binder;
4 import jfun.yan.xml.nut.Nut;
5
6 /**
7  * Represents a case in the <typecase> tag.
8  * See {@link TypeCaseNut}.
9  * <p>
10  * @author Ben Yu
11  * Nov 9, 2005 11:57:47 PM
12  */

13 public class BinderCase extends Nut {
14   private Class JavaDoc type;
15   private Binder binder;
16
17   public Binder getBinder() {
18     return binder;
19   }
20
21   public void setBinder(Binder binder) {
22     this.binder = binder;
23   }
24
25   public Class JavaDoc getType() {
26     return type;
27   }
28
29   public void setType(Class JavaDoc type) {
30     this.type = type;
31   }
32   public void eval(){
33     checkMandatory("type", type);
34     checkMandatory("binder", binder);
35   }
36 }
37
Popular Tags