FileDocCategorySizeDatePackage
JavaObject.javaAPI DocphoneME MR2 API (J2ME)3838Wed May 02 17:59:48 BST 2007com.sun.cldchi.tools.memoryprofiler.data

JavaObject

public class JavaObject extends Object
This class is container for Java Object information. It contains all object data.
see
com.sun.cldchi.tools.memoryprofiler.data.MPDataProvider

Fields Summary
public final int
address
address of the java object
final int
class_id
unique id of class of the java object
public final int
size
size of the java object
public final int
object_type
private int
root_distance
final int
_stack_id
these fields are used only for stacks
final HashMap
_stack_offsets
final int[]
_references_addresses
addresses of the objects which are referenced by this object
private Collection
_references
private Collection
_referees
Constructors Summary
JavaObject(int p_address, int p_class_id, int p_size, int[] references, int p_obj_type)

    this(p_address, p_class_id, p_size, references, p_obj_type, null, -1);
  
JavaObject(int p_address, int p_class_id, int p_size, int[] references, int p_obj_tp, HashMap offsets, int stack_id)

    address = p_address;
    class_id = p_class_id;
    size = p_size;
    object_type = p_obj_tp;
    _references_addresses = references;
    _stack_offsets = offsets;
    _stack_id = stack_id;
  
Methods Summary
public voidadd_referee(com.sun.cldchi.tools.memoryprofiler.data.JavaObject referee)

      _referees.add(referee);
  
public voidadd_reference(com.sun.cldchi.tools.memoryprofiler.data.JavaObject reference)

    _references.add(reference);
  
public booleanalive()
return true, if there is a chain of linked objects started from a root object and finished in this object

return
true if it is a live object

return root_distance != -1;
public intgetRootDistance()
return minimal size of a chain of linked objects started from a root object and finished in this object

    return root_distance;
  
public java.lang.Object[]get_referees()
return the array of objects which are reference this object

return
array of JavaObject

    return _referees.toArray();
  
public java.lang.Object[]get_references()
return the array of objects which are referenced by this object

return
array of JavaObject


                        
     
    return _references.toArray();
  
voidsetRootDistance(int dist)
set the minimal size of a chain of linked objects started from a root object and finished in this object

    root_distance = dist;
  
public java.lang.StringtoString()

    return /*Integer.toString(root_distance) + */"0x" + Integer.toHexString(address);