Enum Constant and Description |
---|
BYTE
The byte data type.
|
DWORD
The double-word data type.
|
HWORD
The half-word data type.
|
QWORD
The quad-word data type.
|
WORD
The word data type.
|
Modifier and Type | Method and Description |
---|---|
long |
align(long address)
Returns the aligned address (zero a required number of bits at the end).
|
boolean |
isAligned(long address)
Checks whether the address is aligned (contains a sufficient number of zero bits at the end).
|
int |
size()
Returns the size in bytes.
|
static DataType |
type(int sizeInBytes) |
static DataType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static DataType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DataType BYTE
public static final DataType HWORD
public static final DataType WORD
public static final DataType DWORD
public static final DataType QWORD
public static DataType[] values()
for (DataType c : DataType.values()) System.out.println(c);
public static DataType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static DataType type(int sizeInBytes)
public int size()
public boolean isAligned(long address)
address
- the address to be checked.true
if the address is aligned; false
otherwise.public long align(long address)
address
- the address to be aligned.