public class MemoryByte extends Object
Clients may instantiate this class. Clients may subclass this class to add other attributes to a memory byte, as required.
IMemoryBlockExtension
Modifier and Type | Field and Description |
---|---|
static byte |
BIG_ENDIAN
Bit mask used to indicate a this byte of memory
is big endian.
|
static byte |
CHANGED
Bit mask used to indicate a byte has changed since the last
suspend event.
|
static byte |
ENDIANESS_KNOWN
Bit mask used to indicate that the endianess of this byte
of memory is known.
|
protected byte |
flags
Attribute flags.
|
static byte |
HISTORY_KNOWN
Bit mask used to indicate a memory byte has history to
determine if its value has changed.
|
static byte |
READABLE
Bit mask used to indicate a byte is readable.
|
protected byte |
value
Value of this byte.
|
static byte |
WRITABLE
Bit mask used to indicate a byte is writable.
|
Constructor and Description |
---|
MemoryByte()
Constructs a readable, writable memory byte without a change history,
and a value of 0.
|
MemoryByte(byte byteValue)
Constructs a readable, writable memory byte without a change history,
with the given value.
|
MemoryByte(byte byteValue,
byte byteFlags)
Constructs a memory byte with the given value and attributes.
|
Modifier and Type | Method and Description |
---|---|
byte |
getFlags()
Returns this memory byte's attribute as a bit mask.
|
byte |
getValue()
Returns the value of this memory byte.
|
boolean |
isBigEndian()
Returns whether this byte of memory is big endian.
|
boolean |
isChanged()
Returns whether this memory byte has changed.
|
boolean |
isEndianessKnown()
Returns whether the endianess of this byte of memory is known.
|
boolean |
isHistoryKnown()
Returns whether the history of this byte is known.
|
boolean |
isReadable()
Returns whether this memory byte is readable.
|
boolean |
isWritable()
Returns whether this memory byte is writable.
|
void |
setBigEndian(boolean isBigEndian)
Sets whether this byte of memory is big endian.
|
void |
setChanged(boolean changed)
Sets whether this memory byte has changed.
|
void |
setEndianessKnown(boolean isEndianessKnown)
Sets whether the endianess of this byte of memory is known.
|
void |
setFlags(byte flags)
Sets this memory byte's attributes based on the given bit mask.
|
void |
setHistoryKnown(boolean known)
Sets whether the history of this byte is known.
|
void |
setReadable(boolean readable)
Sets whether this memory byte is readable.
|
void |
setValue(byte value)
Sets the value of this memory byte.
|
void |
setWritable(boolean writable)
Sets whether this memory byte is writable.
|
public static final byte WRITABLE
public static final byte READABLE
public static final byte CHANGED
DebugEvent.SUSPEND
,
Constant Field Valuespublic static final byte HISTORY_KNOWN
public static final byte BIG_ENDIAN
public static final byte ENDIANESS_KNOWN
protected byte value
protected byte flags
To specify READABLE: flags |= MemoryByte.READABLE; To specify WRITABLE: flags |= MemoryByte.WRITABLE;
public MemoryByte()
public MemoryByte(byte byteValue)
byteValue
- value of this memory bytepublic MemoryByte(byte byteValue, byte byteFlags)
byteValue
- value of this memory bytebyteFlags
- attributes of the byte specified as a bit maskpublic byte getFlags()
public void setFlags(byte flags)
flags
- bit mask of attributespublic byte getValue()
public void setValue(byte value)
value
- the new value of this memory bytepublic void setReadable(boolean readable)
readable
- whether this memory byte is readablepublic boolean isReadable()
public void setWritable(boolean writable)
writable
- whether this memory byte is writable.public boolean isWritable()
public void setChanged(boolean changed)
changed
- whether this memory byte has changedpublic boolean isChanged()
public void setHistoryKnown(boolean known)
known
- whether the change state of this byte is knownpublic boolean isHistoryKnown()
public void setBigEndian(boolean isBigEndian)
isBigEndian
- whether the byte of memory is big endian.public boolean isBigEndian()
public void setEndianessKnown(boolean isEndianessKnown)
isEndianessKnown
- whether the endianess of this byte is known.public boolean isEndianessKnown()
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.