| 1 | /* |
| 2 | * Copyright 2008 Eric Caspole |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this |
| 5 | * file except in compliance with the License. You may obtain a copy of the License at |
| 6 | * |
| 7 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | * |
| 9 | * Unless required by applicable law or agreed to in writing, software distributed under |
| 10 | * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 11 | * KIND, either express or implied. See the License for the specific language governing |
| 12 | * permissions and limitations under the License. |
| 13 | */ |
| 14 | |
| 15 | package net.sf.madmap; |
| 16 | |
| 17 | import java.util.*; |
| 18 | import java.io.*; |
| 19 | |
| 20 | public class HprofStackTraceData extends HprofData { |
| 21 | int _id; |
| 22 | Vector _elements; |
| 23 | |
| 24 | public HprofStackTraceData( int id, Vector elems ) { |
| 25 | _id = id; |
| 26 | _elements = elems; |
| 27 | } |
| 28 | |
| 29 | public Vector getStackVector() { return _elements; } |
| 30 | |
| 31 | public String toString() { |
| 32 | StringBuffer p = new StringBuffer(); |
| 33 | |
| 34 | p.append("TRACE " + _id + ":\n"); |
| 35 | for (int i = 0; i < _elements.size(); i++) { |
| 36 | String s = (String) _elements.elementAt( i ); |
| 37 | p.append(" " + s + "\n"); |
| 38 | } |
| 39 | return p.toString(); |
| 40 | } |
| 41 | |
| 42 | } |