|
|||||||
| 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.DelegatedArgument
Abstract DelegatedArgument class represents a base class for all classes
exact value of which is delegated to different object.
| Field Summary |
| Fields inherited from class com.smardec.j2native.Argument |
JAVA_SIDE, NATIVE_SIDE |
| Constructor Summary | |
DelegatedArgument()
|
|
| Method Summary | |
protected void |
finalize()
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. |
void |
free()
To avoid memory leaks in native memory should be used this method. |
void |
fromBytesValue(byte[] bytes,
int offset)
Restores itself from provided array of bytes. |
protected int |
getAlignedLength()
Returns aligned to mashine word lenght of the Argument. |
protected Argument |
getInternalValue()
Returns internal Argument object to which all invokes are passed. |
int |
getLength()
Returns length in bytes. |
protected boolean |
isFixedLength()
Identify if Argument is a fixed length variable. |
protected void |
read(long handle,
int offset)
Reads itself from the memory. |
void |
readFromRAM(long handle,
int offset)
Public method to read Argument from the native memmory. |
protected void |
readFromStack(byte[] stack,
int offset)
Read itself from stack. |
protected void |
restoreFromRAM()
Restores itself from native memory. |
protected void |
setInternalValue(Argument internalValue)
Sets internal Argument object to which all invokes are passed. |
protected long |
storeToRAM()
Stores itself to the native memory. |
byte[] |
toBytesValue()
Encodes itself and returns it's representation as array of bytes. |
void |
toBytesValue(byte[] bytes,
int offset)
Encodes itself to the provided array of bytes. |
protected void |
write(long handle,
int offset)
Writes itself to the memory. |
void |
writeToRAM(long handle,
int offset)
Public method to write Argument to the native memmory. |
protected void |
writeToStack(byte[] stack,
int offset)
Writes itself to stack. |
| Methods inherited from class com.smardec.j2native.Argument |
clone, getResultFlags, update |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DelegatedArgument()
| Method Detail |
protected Argument getInternalValue()
Argument object to which all invokes are passed.
protected void setInternalValue(Argument internalValue)
Argument object to which all invokes are passed.
internalValue - Argument object to setpublic byte[] toBytesValue()
Argument
toBytesValue in class ArgumentArgument
public void toBytesValue(byte[] bytes,
int offset)
Argument
toBytesValue in class Argumentbytes - array of bytes to which Argument will be writtenoffset - offset in array
public void fromBytesValue(byte[] bytes,
int offset)
Argument
fromBytesValue in class Argumentbytes - array of bytes from which Argument will be restoredoffset - offset in array
protected void write(long handle,
int offset)
throws MemoryException
Argument
write in class Argumenthandle - identifies location in memory where Argument
will be writtenoffset - memory address offset
MemoryException - if memory manipulations or memory access failed
protected void read(long handle,
int offset)
throws MemoryException
Argument
read in class Argumenthandle - identifies location in memory from which Argument
will be readoffset - memory address offset
MemoryException - if memory manipulations or memory access failed
protected void writeToStack(byte[] stack,
int offset)
Argument
writeToStack in class Argumentstack - it's byte array, where Argument will be writtenoffset - offset in stack
protected void readFromStack(byte[] stack,
int offset)
Argument
readFromStack in class Argumentstack - it's byte array, from which Argument will be restoredoffset - offset in stackpublic int getLength()
Argument
getLength in class Argumentprotected int getAlignedLength()
ArgumentArgument.
getAlignedLength in class Argumentprotected long storeToRAM()
ArgumentArgument takes care of memory allocation and
writes itself to this allocated memory. After all operations complete method returns this memory address.
storeToRAM in class Argumentprotected void restoreFromRAM()
ArgumentArgument should be written to
native memory previously.
restoreFromRAM in class Argument
public void writeToRAM(long handle,
int offset)
ArgumentArgument to the native memmory. This method uses
void write(long handle, int offset) method to perform operation.
writeToRAM in class Argumenthandle - identifies location in memory where Argument
will be writtenoffset - memory address offsetArgument.write(long, int)
public void readFromRAM(long handle,
int offset)
ArgumentArgument from the native memmory. This method uses
void read(long handle, int offset) method to perform operation.
readFromRAM in class Argumenthandle - identifies location in memory from which Argument
will be readoffset - memory address offsetArgument.read(long, int)public void free()
Argument
free in class Argumentprotected void finalize()
Argument
finalize in class Argumentprotected boolean isFixedLength()
ArgumentArgument is a fixed length variable.
isFixedLength in class Argumenttrue if it is so, and false otherwise
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||