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.io.*;
18 import java.util.*;
19
20 public class HprofRoot extends HprofHeapElement {
21 String _kind;
22
23 /*
24 if ( kindstr.equals("<JNI global ref>") ) {
25 } else if ( kindstr.equals("<unknown>") ) {
26 } else if ( kindstr.equals("<Java stack>") ) {
27 } else if ( kindstr.equals("<thread block>") ) {
28 } else if ( kindstr.equals("<JNI local ref>") ) {
29 } else if ( kindstr.equals("<thread>") ) {
30 } else if ( kindstr.equals("<busy monitor>") ) {
31 } else if ( kindstr.equals("<native stack>") ) {
32 } else if ( kindstr.equals("<system class>") ) {
33 */
34
35 public HprofRoot( long o, String k ) {
36 super( o );
37 _kind = k;
38 }
39
40 public String rootType() {
41 return _kind;
42 }
43
44 public String toString() {
45 StringBuffer p = new StringBuffer();
46
47 p.append( "ROOT " + Long.toHexString(addr()) + " (kind=" + _kind + ")");
48 return p.toString();
49 }
50
51 }