1   package ducks;
2   
3   import java.util.LinkedList;
4   import java.util.List;
5   
6   import net.sourceforge.jparam.JParam;
7   
8   public class DuckRegistrations {
9   
10  	public static void registerDucks() {
11  		JParam.registerClass("archduck", ArchDuck.class);
12  		JParam.registerClass("duck", Duck.class);
13  		JParam.registerClass("ducky", Ducky.class);
14  		JParam.registerClass("duckling", Duckling.class);
15  
16  		JParam.registerHelperClass(DuckRegistrations.class);
17  	}
18  
19  	public static char convert_duck_to_char(Duck d) {
20  	    // ignore d
21  	    if (d == null) {
22  	    }
23  		return 7;
24  	}
25  
26  	public static short convert_duck_to_short(Duck d) {
27  	    // ignore d
28  	    if (d == null) {
29  	    }
30  		return 8;
31  	}
32  
33  	public static List output(Duckling d) {
34  		List l = new LinkedList();
35  		l.add(d.whoami());
36  		l.add(new Coordinate(3, 5));
37  		return l;
38  	};
39  
40  	public static List output(Ducky d) {
41  		List l = new LinkedList();
42  		l.add(d.whoami());
43  		return l;
44  	};
45  
46  	public static Ducky create_ducky() {
47  		return new Ducky("the void by a creator");
48  	}
49  
50  	//@TODO: this was an explicit creator...
51  	public static Ducky create_ducky_2(Double d) {
52  	    // ignore d
53  	    if (d == null) {
54  	    }
55  		return new Ducky("a double by a creator");
56  	}
57  }