public abstract class NativeInteger extends NativePrimitive
| Modifier and Type | Field and Description |
|---|---|
private boolean |
array
Flag to allow differential rendering between scalar and array elements.
|
protected long |
value
The stored value.
|
copyIn, copyOut, passByPointer, ptr, ref, type| Constructor and Description |
|---|
NativeInteger()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getValue()
Access the data element.
|
boolean |
isInArray()
Reports if this data element is an array member.
|
void |
readExternal(java.io.ObjectInput in)
Replacement for the default object reading method.
|
void |
setInArray(boolean array)
Defines whether or not the data element is an array member.
|
void |
setValue(long value)
Assign the data element.
|
void |
writeExternal(java.io.ObjectOutput out)
Replacement for the default object writing method.
|
void |
writeNativeWordSize(memptr ptr)
This method should be used to render signed scalar elements such that the written data is
sign-extended to the word-size.
|
readNative, render, restore, writeNativeisCopyIn, isCopyOut, isPassByPointer, render, restore, setCopyIn, setCopyOut, setPassByPointer, setType, size, typeprotected long value
private boolean array
public long getValue()
public void setValue(long value)
value - The new integer data element.public boolean isInArray()
true if this is an element of an array.public void setInArray(boolean array)
array - true if this is an element of an array.public void writeNativeWordSize(memptr ptr)
This doesn't apply to non-integer data. It also doesn't apply to arrays, since there is no word-size "padding" in array elements. Each native array's element is exactly the size of the element itself and so there is no sign-extending to do.
ptr - The buffer in which to write at position 1.public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.ExternalizablereadExternal in class BaseNativeTypein - The input source from which fields will be restored.java.io.IOException - In case of I/O errors.java.lang.ClassNotFoundException - If payload can't be instantiated.public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.ExternalizablewriteExternal in class BaseNativeTypeout - The output destination to which fields will be saved.java.io.IOException - In case of I/O errors.