/Users/lyon/j4p/src/classUtils/delegate/Sample.java
|
1 package classUtils.delegate;
2
3 /**
4 ChineseExample class - example class
5 AmericanExample class - example class
6 @author: Job Shen
7 These classes are used by the cutils.delegate synthesizer to automatically
8 generate a new class file which inheritate them
9
10 */
11
12 // --------- auto gened example:
13
14 class Sample extends Exception {
15 public Sample() {
16 }
17
18 public String toString() {
19 return "ChineseExample";
20 }
21
22 public Sample(String s) {
23 super(s);
24 }
25
26 public String language() {
27 return "ChineseExample";
28 }
29
30 public String bornCountry() throws Sample {
31 String s = new String("china");
32 if (!s.equals("china"))
33 throw new Sample("not born in china, born in" + s);
34 return "china";
35 }
36 }
37
38 class AmericanExample1 {
39 public String language() {
40 return "English";
41 }
42
43 public boolean liveUSA() {
44 return true;
45 }
46 }