Mercurial > hg > Database > Alice
view src/alice/test/codesegment/api/PrintNumber.java @ 335:2f003d5703d5 META_CODESEGMENT
Meta CodeSegment Test
author | sugi |
---|---|
date | Mon, 14 Apr 2014 15:46:29 +0900 |
parents | |
children |
line wrap: on
line source
package alice.test.codesegment.api; import alice.codesegment.CodeSegment; import alice.codesegment.CodeSegmentManager; import alice.datasegment.CommandType; import alice.datasegment.Receiver; public class PrintNumber extends CodeSegment { private Receiver info1 = ids.create(CommandType.PEEK); public PrintNumber(){ ods.put("TEST1", 123); } @Override public void run() { Integer num = info1.asInteger(); System.out.println(num); CodeSegmentManager.submit(codeSegment);// javassist } public void setKey() { info1.setKey("TEST1"); } }