예제 #1
0
  public void report(Map<String, Object> json) {
    if (json != null) {
      json.put("module", getClass().getName());

      {
        Map<String, Object> _runtime = new HashMap<String, Object>();

        if (stat != null) {
          Map<String, Object> _stat = new HashMap<String, Object>();
          stat.report(_stat);
          _runtime.put("stat", _stat);
        }

        json.put("runtime", _runtime);
      }
    }
  }
예제 #2
0
  public void report(Element xml) {
    if (xml != null) {
      xml.setAttribute("module", getClass().getName());

      Document doc = xml.getOwnerDocument();

      {
        Element _runtime = doc.createElement("runtime");

        if (stat != null) {
          Element _stat = doc.createElement("stat");
          stat.report(_stat);
          _runtime.appendChild(_stat);
        }

        xml.appendChild(_runtime);
      }
    }
  }