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

COVERAGE SUMMARY FOR SOURCE FILE [HprofHeapAllocation.java]

nameclass, %method, %block, %line, %
HprofHeapAllocation.java100% (1/1)82%  (9/11)80%  (47/59)81%  (14.6/18)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class HprofHeapAllocation100% (1/1)82%  (9/11)80%  (47/59)81%  (14.6/18)
HprofHeapAllocation (long): void 0%   (0/1)0%   (0/7)0%   (0/3)
setStackTrace (int): int 0%   (0/1)0%   (0/5)0%   (0/1)
HprofHeapAllocation (long, int, HprofClassElement): void 100% (1/1)100% (13/13)100% (5/5)
children (): long [] 100% (1/1)100% (3/3)100% (1/1)
children_size (): long 100% (1/1)100% (10/10)100% (3/3)
className (): String 100% (1/1)100% (4/4)100% (1/1)
class_addr (): HprofClassElement 100% (1/1)100% (3/3)100% (1/1)
getActualClass (): HprofClassElement 100% (1/1)100% (3/3)100% (1/1)
getStackTrace (): int 100% (1/1)100% (3/3)100% (1/1)
set_children (long []): void 100% (1/1)100% (4/4)100% (1/1)
set_class_addr (HprofClassElement): void 100% (1/1)100% (4/4)100% (1/1)

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 */
14package net.sf.madmap;
15 
16import java.util.*;
17 
18/**
19 * HprofHeapAllocation is the base class for objects and arrays, holding some
20 * common methods for managing the contained refs. Each HprofHeapAllocation 
21 * has a ref to a HprofClassElement which is the java class for the object.
22 * 
23 * @author ecaspole
24 *  
25 */
26public abstract class HprofHeapAllocation extends HprofHeapCollectable {
27  HprofClassElement   _class_addr;
28  long[]              _elems  = null;
29  int                 _trace;
30 
31  public HprofHeapAllocation( long addr, int trace, HprofClassElement cls_addr ) {
32    super( addr );
33    _class_addr = cls_addr;
34        _trace  = trace;
35  }
36 
37  
38  public HprofHeapAllocation( long addr ) {
39    super( addr );
40  }
41  
42  public long children_size() {
43    if ( _elems != null ) {
44      return _elems.length;
45    }
46    return 0;
47  }
48 
49  public void     set_children( long[] elems )     { _elems = elems; }
50  public long[]   children()            { return _elems; }
51 
52  public int  getStackTrace()           { return _trace; }
53  public int  setStackTrace( int x )    { return _trace = x; }
54 
55  abstract public long     size();
56  public HprofClassElement     class_addr()       { return _class_addr; }  
57  public void     set_class_addr( HprofClassElement new_addr ) { _class_addr = new_addr; }
58 
59  public HprofClassElement getActualClass() { 
60    return class_addr();
61  }
62  
63  public String   className() { 
64    return class_addr().className();
65  }
66}

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