Mercurial > hg > Database > Alice
view src/main/java/alice/test/reflection/MetaCodeSegment.java @ 418:a269a019f5f8 dispose
reflection test
author | sugi |
---|---|
date | Tue, 15 Jul 2014 06:15:53 +0900 |
parents | aadea6a59376 |
children | 6e304a7a60e7 |
line wrap: on
line source
package alice.test.reflection; import org.msgpack.type.Value; import alice.codesegment.CodeSegment; import alice.datasegment.CommandType; import alice.datasegment.Receiver; public class MetaCodeSegment extends CodeSegment { // create input datasegment arg1 Receiver arg1 = ids.create(CommandType.TAKE); public MetaCodeSegment(){ arg1.setKey("key1", arg1.index); } @Override public void run() { System.out.println("type = " + arg1.type); System.out.println("index = " + arg1.index); System.out.println("data = " + arg1.getVal()); System.out.println(((Value)arg1.getVal()).getType()); System.out.println(MetaCodeSegment.class); if (arg1.index == 10) { System.exit(0); return; } // DataSegment.get("local").update ods.update("local", "key1", "String data"); //this.recycle(); } }