|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.jniwrapper.Parameter | +--com.jniwrapper.DelegatingParameter | +--com.jniwrapper.PlatformInteger | +--com.jniwrapper.Int
C-like int
value.
Constructor Summary | |
Int()
Constructs a new int parameter. |
|
Int(IntegerParameter t)
Constructs a new int parameter. |
|
Int(long val)
Constructs a new int parameter. |
Method Summary | |
protected void |
acceptIOPerformer(IOPerformer performer,
DataBuffer source,
int initialOffset)
Realization of a Visitor pattern for parameter IO. |
java.lang.Object |
clone()
|
boolean |
equals(java.lang.Object obj)
Compares this Parameter object to a given object. |
protected DataBuffer |
getBuffer()
Returns current data storage. |
int |
getLength()
Returns a length of the parameter in memory. |
protected int |
getOffset()
Returns current offset within data storage. |
long |
getValue()
Returns integer value converted to long |
void |
read(DataBuffer stackBuffer,
int offset)
Reads this parameter from a specified data source. |
protected void |
setBuffer(DataBuffer newSource,
int newOffset)
Sets the data buffer this parameter should use to store data and an offset in bytes within that buffer. |
void |
setValue(long val)
Sets integer value |
java.lang.String |
toString()
|
void |
write(DataBuffer stackBuffer,
int offset)
Writes this parameter to a specified data source. |
Methods inherited from class com.jniwrapper.Parameter |
asReturnValue, getAlignedLength, indent, pop, push, read, toByteArray, write |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Int()
int
parameter.
public Int(long val)
val
- initial value.public Int(IntegerParameter t)
t
- parameter to take initial value from.Method Detail |
public java.lang.Object clone()
clone
in class com.jniwrapper.PlatformInteger
public long getValue()
IntegerParameter
long
getValue
in interface IntegerParameter
public void setValue(long val)
IntegerParameter
setValue
in interface IntegerParameter
public boolean equals(java.lang.Object obj)
Parameter
Parameter
object to a given object.
Two Parameter
objects are considered equal if their
byte representations are equal and they are of the same type.
Subclasses may override this method as appropriate.
equals
in class Parameter
obj
- value to compare this object to
true
if two objects are equal.public java.lang.String toString()
toString
in class java.lang.Object
protected void acceptIOPerformer(IOPerformer performer, DataBuffer source, int initialOffset)
Parameter
performer
is responsible for I/Oing the
parameter. Users implementing a complex parameter from scratch (i.e. not by extending a pre-existing class
such as Structure
or Pointer
) may wish to override this method to make a performer
visit object internal parts.
acceptIOPerformer
in class Parameter
performer
- visitor responsible for I/Oing the parametersource
- data buffer for I/O operationinitialOffset
- I/O operation offset of this parameter in the bufferprotected void setBuffer(DataBuffer newSource, int newOffset)
Parameter
setBuffer
in class Parameter
protected DataBuffer getBuffer()
Parameter
getBuffer
in class Parameter
protected int getOffset()
Parameter
getOffset
in class Parameter
public int getLength()
Parameter
sizeof()
operator.
getLength
in class Parameter
public void write(DataBuffer stackBuffer, int offset) throws MemoryAccessViolationException
Parameter
write
in class Parameter
MemoryAccessViolationException
public void read(DataBuffer stackBuffer, int offset) throws MemoryAccessViolationException
Parameter
read
in class Parameter
MemoryAccessViolationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |