EMMA Coverage Report (generated Sat Jun 02 16:47:50 EDT 2012)
[all classes][net.sf.madmap]

COVERAGE SUMMARY FOR SOURCE FILE [ThreadTableModel.java]

nameclass, %method, %block, %line, %
ThreadTableModel.java0%   (0/1)0%   (0/7)0%   (0/124)0%   (0/25)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ThreadTableModel0%   (0/1)0%   (0/7)0%   (0/124)0%   (0/25)
<static initializer> 0%   (0/1)0%   (0/8)0%   (0/1)
ThreadTableModel (TreeSet): void 0%   (0/1)0%   (0/50)0%   (0/5)
getColumnClass (int): Class 0%   (0/1)0%   (0/5)0%   (0/1)
getColumnCount (): int 0%   (0/1)0%   (0/4)0%   (0/1)
getColumnName (int): String 0%   (0/1)0%   (0/5)0%   (0/1)
getRowCount (): int 0%   (0/1)0%   (0/4)0%   (0/1)
getValueAt (int, int): Object 0%   (0/1)0%   (0/48)0%   (0/15)

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 
15package net.sf.madmap;
16 
17import java.io.*;
18import java.util.*;
19import java.awt.*;
20import java.awt.event.*;
21import javax.swing.*;
22import javax.swing.filechooser.*;
23 
24 
25public class ThreadTableModel extends javax.swing.table.AbstractTableModel {
26  TreeSet     threads;
27  
28  private String[] columnNames = {
29    "Object Address",
30    "Thread Name",
31    "Hprof ID"
32  };
33  
34  private Class[] columnType = {
35    (java.lang.Class)((new String("")).getClass()),
36    (java.lang.Class)((new String("")).getClass()),
37    (java.lang.Class)((new Long(0)).getClass())
38  };
39    
40  public ThreadTableModel( TreeSet thdTable ) {
41    threads = thdTable;
42  }
43 
44  public Class getColumnClass(int c) {
45    return columnType[c];
46  }
47  
48  public String getColumnName(int col) {
49      return columnNames[col];
50  }
51 
52  public int getColumnCount() { return columnNames.length; }
53  public int getRowCount() { return threads.size(); }
54  
55  public Object getValueAt(int row, int col) { 
56    Iterator<HprofThreadData>   ihoc3 = threads.iterator();
57    int i = 0;
58 
59    while( ihoc3.hasNext() ) {
60      HprofThreadData hk = ihoc3.next();
61      
62      if ( i == row ) {
63        if ( col == 0 ) {
64          return Long.toHexString(hk.addr());
65        } else if ( col == 1 ) {
66          return hk.name();
67        } else if ( col == 2 ) {
68          return new Long(hk.id());
69        }
70      }
71      
72      i += 1;
73    }
74    
75    assert  true == false : "Should not reach here!" ;
76    return null;
77  }    
78};

[all classes][net.sf.madmap]
EMMA 2.0.5312 (C) Vladimir Roubtsov