com.android.ddmlib
Class HeapSegment.HeapSegmentElement

java.lang.Object
  extended by com.android.ddmlib.HeapSegment.HeapSegmentElement
All Implemented Interfaces:
java.lang.Comparable<HeapSegment.HeapSegmentElement>
Enclosing class:
HeapSegment

public static class HeapSegment.HeapSegmentElement
extends java.lang.Object
implements java.lang.Comparable<HeapSegment.HeapSegmentElement>

Describes an object/region encoded in the HPSG data.


Field Summary
static int KIND_ARRAY_1
          The element describes an array of 1-byte elements.
static int KIND_ARRAY_2
          The element describes an array of 2-byte elements.
static int KIND_ARRAY_4
          The element describes an array of 4-byte elements.
static int KIND_ARRAY_8
          The element describes an array of 8-byte elements.
static int KIND_CLASS_OBJECT
          The element describes a class object.
static int KIND_INVALID
          The object kind is unknown or unspecified.
static int KIND_NATIVE
          The element describes a native object.
static int KIND_OBJECT
          The element describes a data object.
static int KIND_UNKNOWN
          The element describes an unknown type of object.
static int SOLIDITY_FINALIZABLE
          The element is pending finalization.
static int SOLIDITY_FREE
          The element describes a free block.
static int SOLIDITY_HARD
          The element is strongly-reachable.
static int SOLIDITY_INVALID
          The reachability of the object is unknown.
static int SOLIDITY_PHANTOM
          The element is phantom-reachable.
static int SOLIDITY_SOFT
          The element is softly-reachable.
static int SOLIDITY_SWEEP
          The element is not reachable, and is about to be swept/freed.
static int SOLIDITY_WEAK
          The element is weakly-reachable.
 
Constructor Summary
HeapSegment.HeapSegmentElement()
          Creates an uninitialized element.
HeapSegment.HeapSegmentElement(HeapSegment hs)
          Create an element describing the entry at the current position of hpsgData.
 
Method Summary
 int compareTo(HeapSegment.HeapSegmentElement other)
           
 int getKind()
           
 int getLength()
           
 int getSolidity()
           
 HeapSegment.HeapSegmentElement set(HeapSegment hs)
          Replace the element with the entry at the current position of hpsgData.
 void setKind(int kind)
           
 void setLength(int length)
           
 void setSolidity(int solidity)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOLIDITY_FREE

public static int SOLIDITY_FREE
The element describes a free block.


SOLIDITY_HARD

public static int SOLIDITY_HARD
The element is strongly-reachable.


SOLIDITY_SOFT

public static int SOLIDITY_SOFT
The element is softly-reachable.


SOLIDITY_WEAK

public static int SOLIDITY_WEAK
The element is weakly-reachable.


SOLIDITY_PHANTOM

public static int SOLIDITY_PHANTOM
The element is phantom-reachable.


SOLIDITY_FINALIZABLE

public static int SOLIDITY_FINALIZABLE
The element is pending finalization.


SOLIDITY_SWEEP

public static int SOLIDITY_SWEEP
The element is not reachable, and is about to be swept/freed.


SOLIDITY_INVALID

public static int SOLIDITY_INVALID
The reachability of the object is unknown.


KIND_OBJECT

public static int KIND_OBJECT
The element describes a data object.


KIND_CLASS_OBJECT

public static int KIND_CLASS_OBJECT
The element describes a class object.


KIND_ARRAY_1

public static int KIND_ARRAY_1
The element describes an array of 1-byte elements.


KIND_ARRAY_2

public static int KIND_ARRAY_2
The element describes an array of 2-byte elements.


KIND_ARRAY_4

public static int KIND_ARRAY_4
The element describes an array of 4-byte elements.


KIND_ARRAY_8

public static int KIND_ARRAY_8
The element describes an array of 8-byte elements.


KIND_UNKNOWN

public static int KIND_UNKNOWN
The element describes an unknown type of object.


KIND_NATIVE

public static int KIND_NATIVE
The element describes a native object.


KIND_INVALID

public static int KIND_INVALID
The object kind is unknown or unspecified.

Constructor Detail

HeapSegment.HeapSegmentElement

public HeapSegment.HeapSegmentElement()
Creates an uninitialized element.


HeapSegment.HeapSegmentElement

public HeapSegment.HeapSegmentElement(HeapSegment hs)
                               throws java.nio.BufferUnderflowException,
                                      java.text.ParseException
Create an element describing the entry at the current position of hpsgData.

Parameters:
hs - The heap segment to pull the entry from.
Throws:
java.nio.BufferUnderflowException - if there is not a whole entry following the current position of hpsgData.
java.text.ParseException - if the provided data is malformed.
Method Detail

set

public HeapSegment.HeapSegmentElement set(HeapSegment hs)
                                   throws java.nio.BufferUnderflowException,
                                          java.text.ParseException
Replace the element with the entry at the current position of hpsgData.

Parameters:
hs - The heap segment to pull the entry from.
Returns:
this object.
Throws:
java.nio.BufferUnderflowException - if there is not a whole entry following the current position of hpsgData.
java.text.ParseException - if the provided data is malformed.

getSolidity

public int getSolidity()

setSolidity

public void setSolidity(int solidity)

getKind

public int getKind()

setKind

public void setKind(int kind)

getLength

public int getLength()

setLength

public void setLength(int length)

compareTo

public int compareTo(HeapSegment.HeapSegmentElement other)
Specified by:
compareTo in interface java.lang.Comparable<HeapSegment.HeapSegmentElement>


Copyright © 2008-2011. All Rights Reserved.