Example #1
0
 private static String getToken(ModelNode operation) {
   StringBuffer sb = new StringBuffer();
   if (operation.get(OP).asString().equals(COMPOSITE)) {
     for (ModelNode step : operation.get(STEPS).asList()) {
       sb.append(" _").append(getOpToken(step));
     }
   } else {
     sb.append(getOpToken(operation));
   }
   return sb.toString();
 }
Example #2
0
  private static String getOpToken(ModelNode operation) {
    StringBuffer sb = new StringBuffer();
    sb.append(operation.get(ADDRESS).asString())
        .append(": ")
        .append(operation.get(OP))
        .append("; ")
        .append(operation.get(CHILD_TYPE).asString())
        .append("; ");

    if (operation.get(NAME).isDefined()) {
      sb.append(operation.get(NAME).asString());
    }
    return sb.toString();
  }