HeapSegment.HeapSegmentElement
public
static
class
HeapSegment.HeapSegmentElement
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.device.server.HeapSegment.HeapSegmentElement |
Describes an object/region encoded in the HPSG data.
Summary
Constants | |
|---|---|
int |
KIND_ARRAY_1
The element describes an array of 1-byte elements. |
int |
KIND_ARRAY_2
The element describes an array of 2-byte elements. |
int |
KIND_ARRAY_4
The element describes an array of 4-byte elements. |
int |
KIND_ARRAY_8
The element describes an array of 8-byte elements. |
int |
KIND_CLASS_OBJECT
The element describes a class object. |
int |
KIND_INVALID
The object kind is unknown or unspecified. |
int |
KIND_NATIVE
The element describes a native object. |
int |
KIND_OBJECT
The element describes a data object. |
int |
KIND_UNKNOWN
The element describes an unknown type of object. |
int |
SOLIDITY_FINALIZABLE
The element is pending finalization. |
int |
SOLIDITY_FREE
The element describes a free block. |
int |
SOLIDITY_HARD
The element is strongly-reachable. |
int |
SOLIDITY_INVALID
The reachability of the object is unknown. |
int |
SOLIDITY_PHANTOM
The element is phantom-reachable. |
int |
SOLIDITY_SOFT
The element is softly-reachable. |
int |
SOLIDITY_SWEEP
The element is not reachable, and is about to be swept/freed. |
int |
SOLIDITY_WEAK
The element is weakly-reachable. |
Public constructors | |
|---|---|
HeapSegmentElement()
Creates an uninitialized element. |
|
HeapSegmentElement(HeapSegment hs)
Create an element describing the entry at the current position of hpsgData. |
|
Public methods | |
|---|---|
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)
|
Constants
KIND_ARRAY_1
public static final int KIND_ARRAY_1
The element describes an array of 1-byte elements.
Constant Value: 2 (0x00000002)
KIND_ARRAY_2
public static final int KIND_ARRAY_2
The element describes an array of 2-byte elements.
Constant Value: 3 (0x00000003)
KIND_ARRAY_4
public static final int KIND_ARRAY_4
The element describes an array of 4-byte elements.
Constant Value: 4 (0x00000004)
KIND_ARRAY_8
public static final int KIND_ARRAY_8
The element describes an array of 8-byte elements.
Constant Value: 5 (0x00000005)
KIND_CLASS_OBJECT
public static final int KIND_CLASS_OBJECT
The element describes a class object.
Constant Value: 1 (0x00000001)
KIND_INVALID
public static final int KIND_INVALID
The object kind is unknown or unspecified.
Constant Value: -1 (0xffffffff)
KIND_NATIVE
public static final int KIND_NATIVE
The element describes a native object.
Constant Value: 7 (0x00000007)
KIND_OBJECT
public static final int KIND_OBJECT
The element describes a data object.
Constant Value: 0 (0x00000000)
KIND_UNKNOWN
public static final int KIND_UNKNOWN
The element describes an unknown type of object.
Constant Value: 6 (0x00000006)
SOLIDITY_FINALIZABLE
public static final int SOLIDITY_FINALIZABLE
The element is pending finalization.
Constant Value: 5 (0x00000005)
SOLIDITY_FREE
public static final int SOLIDITY_FREE
The element describes a free block.
Constant Value: 0 (0x00000000)
SOLIDITY_HARD
public static final int SOLIDITY_HARD
The element is strongly-reachable.
Constant Value: 1 (0x00000001)
SOLIDITY_INVALID
public static final int SOLIDITY_INVALID
The reachability of the object is unknown.
Constant Value: -1 (0xffffffff)
SOLIDITY_PHANTOM
public static final int SOLIDITY_PHANTOM
The element is phantom-reachable.
Constant Value: 4 (0x00000004)
SOLIDITY_SOFT
public static final int SOLIDITY_SOFT
The element is softly-reachable.
Constant Value: 2 (0x00000002)
SOLIDITY_SWEEP
public static final int SOLIDITY_SWEEP
The element is not reachable, and is about to be swept/freed.
Constant Value: 6 (0x00000006)
SOLIDITY_WEAK
public static final int SOLIDITY_WEAK
The element is weakly-reachable.
Constant Value: 3 (0x00000003)
Public constructors
HeapSegmentElement
public HeapSegmentElement ()
Creates an uninitialized element.
HeapSegmentElement
public HeapSegmentElement (HeapSegment hs)
Create an element describing the entry at the current position of hpsgData.
| Parameters | |
|---|---|
hs |
HeapSegment: The heap segment to pull the entry from. |
| Throws | |
|---|---|
|
if there is not a whole entry following the current position of hpsgData. |
|
if the provided data is malformed. |
Public methods
compareTo
public int compareTo (HeapSegment.HeapSegmentElement other)
| Parameters | |
|---|---|
other |
HeapSegment.HeapSegmentElement |
| Returns | |
|---|---|
int |
|
getKind
public int getKind ()
| Returns | |
|---|---|
int |
|
getLength
public int getLength ()
| Returns | |
|---|---|
int |
|
getSolidity
public int getSolidity ()
| Returns | |
|---|---|
int |
|
set
public HeapSegment.HeapSegmentElement set (HeapSegment hs)
Replace the element with the entry at the current position of hpsgData.
| Parameters | |
|---|---|
hs |
HeapSegment: The heap segment to pull the entry from. |
| Returns | |
|---|---|
HeapSegment.HeapSegmentElement |
this object. |
| Throws | |
|---|---|
|
if there is not a whole entry following the current position of hpsgData. |
|
if the provided data is malformed. |
setKind
public void setKind (int kind)
| Parameters | |
|---|---|
kind |
int |
setLength
public void setLength (int length)
| Parameters | |
|---|---|
length |
int |
setSolidity
public void setSolidity (int solidity)
| Parameters | |
|---|---|
solidity |
int |