j2native |
AnsiString |
Argument |
ArrayArgument |
ArrayType |
Bool |
Callback |
Char |
Const |
DelegatedArgument |
DoubleFloat |
FloatArgument |
FloatType |
Function |
FunctionExecutionException |
FunctionNotFoundException |
IllegalMemoryAccessException |
Int |
Int16 |
Int32 |
Int64 |
Int8 |
IntegerArgument |
IntegerType |
J2NativeContext |
Library |
LibraryLoader |
LibraryNotFoundException |
MemoryException |
NumericArgument |
NumericType |
OutOnly |
Pointer |
Pointer.Const |
Pointer.OutOnly |
Pointer.Void |
PointerArgument |
PointerType |
SimpleFloat |
StringType |
StructuralArgument |
Structure |
TypedPointer |
UInt |
UInt16 |
UInt32 |
UInt8 |
Union |
WideChar |
WideString |
ZeroTerminatedString |
| |
com.smardec.j2native
Class NumericArgument
java.lang.Object
|
+--com.smardec.j2native.Argument
|
+--com.smardec.j2native.NumericArgument
- All Implemented Interfaces:
- java.lang.Cloneable, NumericType
- Direct Known Subclasses:
- FloatArgument, IntegerArgument
- public abstract class NumericArgument
- extends Argument
- implements NumericType
Abstract class NumericArgument is a partly realization of common
interface NumericType .
Method Summary |
protected abstract void |
bits2Value(long bits)
Sets the value by its bit representation. |
void |
fromBytesValue(byte[] bytes,
int offset)
Restores itself from provided array of bytes. |
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, getResultFlags, isFixedLength, readFromRAM, restoreFromRAM, storeToRAM, update, writeToRAM |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NumericArgument
public NumericArgument()
writeToStack
protected void writeToStack(byte[] stack,
int offset)
- Description copied from class: Argument
- Writes itself to stack.
- Specified by:
- writeToStack in class Argument
- Parameters:
- stack - it's byte array, where
Argument will be written- offset - offset in stack
readFromStack
protected void readFromStack(byte[] stack,
int offset)
- Description copied from class: Argument
- Read itself from stack.
- Specified by:
- readFromStack in class Argument
- Parameters:
- stack - it's byte array, from which
Argument will be restored- offset - offset in stack
value2Bits
protected abstract long value2Bits()
- Returns the value as bit representation.
- Returns:
- the numeric value represented by this object as bit representation.
bits2Value
protected abstract void bits2Value(long bits)
- Sets the value by its bit representation.
- Parameters:
- bits - value as bit representation
isSigned
protected abstract boolean isSigned()
- Shows if number is signed
isFloat
protected abstract boolean isFloat()
- Shows if number is of floating-point type
toBytesValue
public byte[] toBytesValue()
- Description copied from class: Argument
- Encodes itself and returns it's representation as array of bytes.
- Specified by:
- toBytesValue in class Argument
- Returns:
- byte[] representation of
Argument
toBytesValue
protected void toBytesValue(byte[] bytes,
int offset)
- Description copied from class: Argument
- Encodes itself to the provided array of bytes.
- Specified by:
- toBytesValue in class Argument
- Parameters:
- bytes - array of bytes to which
Argument will be written- offset - offset in array
fromBytesValue
public void fromBytesValue(byte[] bytes,
int offset)
- Description copied from class: Argument
- Restores itself from provided array of bytes.
- Specified by:
- fromBytesValue in class Argument
- Parameters:
- bytes - array of bytes from which
Argument will be restored- offset - offset in array
write
protected final void write(long handle,
int offset)
- Description copied from class: Argument
- Writes itself to the memory. Exact memory address specified by params.
- Specified by:
- write in class Argument
- Parameters:
- handle - identifies location in memory where
Argument
will be written- offset - memory address offset
read
protected final void read(long handle,
int offset)
- Description copied from class: Argument
- Reads itself from the memory. Exact memory address specified by params.
- Specified by:
- read in class Argument
- Parameters:
- handle - identifies location in memory from which
Argument
will be read- offset - memory address offset
|
|
|