comparison src/alice/topology/node/Start.java @ 35:ac3b48c5f4da

share width each other with tree
author kazz <kazz@cr.ie.u-ryukyu.ac.jp>
date Fri, 20 Jan 2012 04:00:12 +0900
parents
children ae24d5d40c10
comparison
equal deleted inserted replaced
34:ca079a730d0b 35:ac3b48c5f4da
1 package alice.topology.node;
2
3 import alice.codesegment.CodeSegment;
4 import alice.datasegment.CommandType;
5 import alice.datasegment.Receiver;
6
7 public class Start extends CodeSegment {
8
9 public Receiver done = ids.create(CommandType.PEEK);
10
11 private Class<? extends CodeSegment> clazz;
12
13 public Start(Class<? extends CodeSegment> clazz) {
14 this.clazz = clazz;
15 }
16
17 @Override
18 public void run() {
19 System.out.println("Start!");
20 if (clazz == null)
21 return;
22 try {
23 clazz.newInstance().execute();
24 } catch (InstantiationException e) {
25 e.printStackTrace();
26 } catch (IllegalAccessException e) {
27 e.printStackTrace();
28 }
29
30 }
31
32 }