コード例 #1
0
 @Override
 protected Plugin parse(Object json) {
   WSUtils utils = WSUtils.getINSTANCE();
   return new Plugin()
       .setKey(utils.getString(json, "key"))
       .setName(utils.getString(json, "name"))
       .setVersion(utils.getString(json, "version"));
 }
コード例 #2
0
 private TimeMachineColumn[] toColumns(Object cols) {
   WSUtils utils = WSUtils.getINSTANCE();
   int size = utils.getArraySize(cols);
   TimeMachineColumn[] result = new TimeMachineColumn[size];
   for (int index = 0; index < size; index++) {
     Object colJson = utils.getArrayElement(cols, index);
     result[index] = new TimeMachineColumn(index, utils.getString(colJson, "metric"), null, null);
   }
   return result;
 }