|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.smardec.j2native.Argument | +--com.smardec.j2native.NumericArgument
Abstract class NumericArgument
is a partly realization of common
interface NumericType
.
Field Summary |
Fields inherited from class com.smardec.j2native.Argument |
JAVA_SIDE, NATIVE_SIDE |
Constructor Summary | |
NumericArgument()
|
Method Summary | |
protected abstract void |
bits2Value(long bits)
Sets the value by its bit representation. |
boolean |
equals(java.lang.Object obj)
|
void |
fromBytesValue(byte[] bytes,
int offset)
Restores itself from provided array of bytes. |
int |
hashCode()
|
protected abstract boolean |
isFloat()
Shows if number is of floating-point type |
protected abstract boolean |
isSigned()
Shows if number is signed |
protected void |
read(long handle,
int offset)
Reads itself from the memory. |
protected void |
readFromStack(byte[] stack,
int offset)
Read itself from stack. |
byte[] |
toBytesValue()
Encodes itself and returns it's representation as array of bytes. |
protected void |
toBytesValue(byte[] bytes,
int offset)
Encodes itself to the provided array of bytes. |
protected abstract long |
value2Bits()
Returns the value as bit representation. |
protected void |
write(long handle,
int offset)
Writes itself to the memory. |
protected void |
writeToStack(byte[] stack,
int offset)
Writes itself to stack. |
Methods inherited from class com.smardec.j2native.Argument |
clone, finalize, free, getAlignedLength, getLength, isFixedLength, readFromRAM, restoreFromRAM, storeToRAM, update, writeToRAM |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.smardec.j2native.NumericType |
booleanValue, byteValue, doubleValue, floatValue, intValue, longValue, shortValue |
Constructor Detail |
public NumericArgument()
Method Detail |
protected void writeToStack(byte[] stack, int offset)
Argument
writeToStack
in class Argument
stack
- it's byte array, where Argument
will be writtenoffset
- offset in stackprotected void readFromStack(byte[] stack, int offset)
Argument
readFromStack
in class Argument
stack
- it's byte array, from which Argument
will be restoredoffset
- offset in stackprotected abstract long value2Bits()
protected abstract void bits2Value(long bits)
bits
- value as bit representationprotected abstract boolean isSigned()
protected abstract boolean isFloat()
public byte[] toBytesValue()
Argument
toBytesValue
in class Argument
Argument
protected void toBytesValue(byte[] bytes, int offset)
Argument
toBytesValue
in class Argument
bytes
- array of bytes to which Argument
will be writtenoffset
- offset in arraypublic void fromBytesValue(byte[] bytes, int offset)
Argument
fromBytesValue
in class Argument
bytes
- array of bytes from which Argument
will be restoredoffset
- offset in arraypublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
protected final void write(long handle, int offset)
Argument
write
in class Argument
handle
- identifies location in memory where Argument
will be writtenoffset
- memory address offsetprotected final void read(long handle, int offset)
Argument
read
in class Argument
handle
- identifies location in memory from which Argument
will be readoffset
- memory address offset
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |