コード例 #1
0
  public Node getPacketInfo(Packet packet) {
    int index = 0;

    int numValues = (int) getVal(packet, index, 4);
    index += 4;
    Node valuesInfo =
        new Node(new Node.Descriptor("NumValues:"), new Node.Value(new Integer(numValues)));

    for (int i = 0; i < numValues; i++) {
      Value value = getValue(packet, index);
      index += value.getOffset();

      Node singleValueInfo = new Node(new Node.Descriptor("Value:"), new Node.Value(value));
      valuesInfo.addChild(singleValueInfo);
    }
    return valuesInfo;
  }
コード例 #2
0
ファイル: Analyzer_4_1.java プロジェクト: eeiee/jdwp-analyzer
  public Node getPacketInfo(Packet packet) {
    int index = 0;
    long refTypeId = getVal(packet, index, referenceTypeIDSize);
    ReferenceType referenceType = ReferenceType.getType(refTypeId);
    index += referenceTypeIDSize;
    Node newArrayInfo =
        new Node(
            new Node.Descriptor("RefTypeID:", referenceType), new Node.Value(new Long(refTypeId)));

    int lenght = (int) getVal(packet, index, 4);
    index += 4;
    Node lenghtInfo =
        new Node(new Node.Descriptor("ArrayLenght:"), new Node.Value(new Integer(lenght)));
    newArrayInfo.addChild(lenghtInfo);

    return newArrayInfo;
  }