/Users/lyon/j4p/src/bookExamples/ch25Delegation/PollutedWaterDelegateExample.java
|
1 package bookExamples.ch25Delegation;
2
3 import classUtils.delegate.DelegateSynthesizer;
4
5 /**
6 * DocJava, Inc. http://www.docjava.com Programmer: dlyon Date: Oct 13,
7 * 2004 Time: 7:52:02 PM
8 */
9 public class PollutedWaterDelegateExample {
10 public static void main(String[] args) {
11 Water w = new Water();
12 Pollution p = new Pollution();
13 DelegateSynthesizer ds = new DelegateSynthesizer();
14 ds.add(w);
15 ds.add(p);
16 ds.add(new java.util.Date());
17 ds.process();
18 System.out.println(ds.getClassString() +
19 ds.getInterface());
20 }
21 }
22