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 final int SOLIDITY_FREE
The element describes a free block.

See Also:
Constant Field Values

SOLIDITY_HARD

public static final int SOLIDITY_HARD
The element is strongly-reachable.

See Also:
Constant Field Values

SOLIDITY_SOFT

public static final int SOLIDITY_SOFT
The element is softly-reachable.

See Also:
Constant Field Values

SOLIDITY_WEAK

public static final int SOLIDITY_WEAK
The element is weakly-reachable.

See Also:
Constant Field Values

SOLIDITY_PHANTOM

public static final int SOLIDITY_PHANTOM
The element is phantom-reachable.

See Also:
Constant Field Values

SOLIDITY_FINALIZABLE

public static final int SOLIDITY_FINALIZABLE
The element is pending finalization.

See Also:
Constant Field Values

SOLIDITY_SWEEP

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

See Also:
Constant Field Values

SOLIDITY_INVALID

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

See Also:
Constant Field Values

KIND_OBJECT

public static final int KIND_OBJECT
The element describes a data object.

See Also:
Constant Field Values

KIND_CLASS_OBJECT

public static final int KIND_CLASS_OBJECT
The element describes a class object.

See Also:
Constant Field Values

KIND_ARRAY_1

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

See Also:
Constant Field Values

KIND_ARRAY_2

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

See Also:
Constant Field Values

KIND_ARRAY_4

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

See Also:
Constant Field Values

KIND_ARRAY_8

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

See Also:
Constant Field Values

KIND_UNKNOWN

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

See Also:
Constant Field Values

KIND_NATIVE

public static final int KIND_NATIVE
The element describes a native object.

See Also:
Constant Field Values

KIND_INVALID

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

See Also:
Constant Field Values
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>