Mercurial > hg > Database > Alice
comparison src/main/java/alice/Annotation/AliceAnnotation.java @ 636:33f300d0720a
running CodeSegment by Annotation without create Receiver :D
author | Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 03 Dec 2017 22:09:35 +0900 |
parents | 69f9c5ff1df9 |
children | 106f50cb7dd9 |
comparison
equal
deleted
inserted
replaced
635:0423eb7fd9ee | 636:33f300d0720a |
---|---|
15 /** | 15 /** |
16 * Created by e125769 on 10/15/17. | 16 * Created by e125769 on 10/15/17. |
17 */ | 17 */ |
18 public class AliceAnnotation extends CodeSegment{ | 18 public class AliceAnnotation extends CodeSegment{ |
19 | 19 |
20 //Receiver piyo = ids.create(CommandType.TAKE); | 20 @Take("hoge") |
21 String hoge; | |
21 | 22 |
22 @Take("hoge") | 23 @Peek("piyo") |
23 Receiver hoge; | 24 int piyo; |
24 | 25 |
25 @Take("huga") | |
26 Receiver huga; | |
27 | 26 |
28 //@TakeRemote(dsm = "remote", key = "piyo") | 27 public AliceAnnotation() { |
29 | 28 ods.put("hoge", "hogehogehgoe"); |
30 public class StringData{public String[] data = {"hoge", "huga", "piyo"};} | 29 ods.put("piyo", 1); |
31 | 30 } |
32 | 31 |
33 @Override | 32 @Override |
34 public void run() { | 33 public void run() { |
35 System.out.println("in run!"); | 34 System.out.println("in run!"); |
36 System.out.println(hoge.asClass(String.class)); | 35 System.out.println(hoge); |
37 System.out.println(huga.asClass(String.class)); | 36 System.out.println(piyo); |
38 } | |
39 | |
40 | |
41 public AliceAnnotation() { | |
42 ods.put("hoge", "hogehogehgoe"); | |
43 ods.put("huga", "hugahugahuga"); | |
44 ods.put("piyo", "piyopiyo"); | |
45 } | |
46 | |
47 public static void main(String[] args){ | |
48 /*AliceAnnotation alice = new AliceAnnotation(); | |
49 alice.test(); | |
50 */ | |
51 } | |
52 | |
53 public void test(){ | |
54 | |
55 } | 37 } |
56 | 38 |
57 } | 39 } |
58 | 40 |