Mercurial > hg > Database > Alice
view 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 |
line wrap: on
line source
package alice.topology.node; import alice.codesegment.CodeSegment; import alice.datasegment.CommandType; import alice.datasegment.Receiver; public class Start extends CodeSegment { public Receiver done = ids.create(CommandType.PEEK); private Class<? extends CodeSegment> clazz; public Start(Class<? extends CodeSegment> clazz) { this.clazz = clazz; } @Override public void run() { System.out.println("Start!"); if (clazz == null) return; try { clazz.newInstance().execute(); } catch (InstantiationException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } } }