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

COVERAGE SUMMARY FOR SOURCE FILE [FinalizerTableModel.java]

nameclass, %method, %block, %line, %
FinalizerTableModel.java0%   (0/1)0%   (0/7)0%   (0/136)0%   (0/25)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class FinalizerTableModel0%   (0/1)0%   (0/7)0%   (0/136)0%   (0/25)
<static initializer> 0%   (0/1)0%   (0/8)0%   (0/1)
FinalizerTableModel (List): 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/60)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 package net.sf.madmap;
15 
16import java.io.*;
17import java.util.*;
18import java.awt.*;
19import java.awt.event.*;
20import javax.swing.*;
21import javax.swing.filechooser.*;
22 
23 
24public class FinalizerTableModel extends javax.swing.table.AbstractTableModel {
25 
26  java.util.List<HprofClassElement>     heap;
27  long        totalLiveSize;
28  
29  private String[] columnNames = {
30    "Type",
31    "Size",
32    "Count"
33  };
34  
35  private Class[] columnType = {
36    (java.lang.Class)((new String("")).getClass()),
37    (java.lang.Class)((new Long(0)).getClass()),
38    (java.lang.Class)((new Long(0)).getClass())
39  };
40    
41  public FinalizerTableModel( java.util.List<HprofClassElement> fList ) {
42    heap = fList;
43  }
44 
45  public Class getColumnClass(int c) {
46    return columnType[c];
47  }
48  
49  public String getColumnName(int col) {
50      return columnNames[col];
51  }
52 
53  public int getColumnCount() { return columnNames.length; }
54  public int getRowCount() { return heap.size(); }
55  
56  public Object getValueAt(int row, int col) { 
57    Iterator<HprofClassElement>   ihoc3 = heap.iterator();
58    int i = 0;
59 
60    while( ihoc3.hasNext() ) {
61      HprofClassElement hk = ihoc3.next();
62      
63      if ( i == row ) {
64        if ( col == 0 ) {
65          return new String( hk.className() + "@" + Long.toHexString(hk.addr()) );
66        } else if ( col == 1 ) {
67          return hk.getFinalizableSize();
68        } else if ( col == 2 ) {
69          return hk.getFinalizableCount();
70        }
71      }
72      
73      i += 1;
74    }
75    
76    assert  true == false : "Should not reach here!" ;
77    return null;
78  }    
79};

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