Mercurial > hg > Papers > 2018 > nozomi-master
diff paper/source/christie/Setup.java @ 156:bc9be2d40d0d
add requiremants
author | Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 30 Jan 2018 23:41:54 +0900 |
parents | |
children | 2bf8a1edcecc |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/paper/source/christie/Setup.java Tue Jan 30 23:41:54 2018 +0900 @@ -0,0 +1,23 @@ +public void setup(CodeGearManager cgm){ + this.cgm = cgm; + this.cge = new CodeGearExecutor(this, this.cgm); + this.localDGM = cgm.getLocalDGM(); + + for (Field field : this.getClass().getDeclaredFields()) { + if (field.isAnnotationPresent(Take.class)) { + Take ano = field.getAnnotation(Take.class); + setTakeCommand("local", ano.value(), initDataGear(field, ano.value())); + } else if (field.isAnnotationPresent(Peek.class)) { + Peek ano = field.getAnnotation(Peek.class); + setPeekCommand("local", ano.value(), initDataGear(field, ano.value())); + } else if (field.isAnnotationPresent(RemoteTake.class)) { + RemoteTake ano = field.getAnnotation(RemoteTake.class); + setTakeCommand(ano.dgmName(), ano.key(), initDataGear(field, ano.key())); + } else if (field.isAnnotationPresent(RemotePeek.class)) { + RemotePeek ano = field.getAnnotation(RemotePeek.class); + setTakeCommand(ano.dgmName(), ano.key(), initDataGear(field, ano.key())); + } + } + + idg.finishInput(cgm, commandList); +}