public abstract class ByReference extends PointerType
Derived classes must define setValue(<T>) and
<T> getValue() methods which write to/read from the
allocated memory.
This class derives from PointerType instead of Memory in order to restrict
the API to only getValue/setValue.
NOTE: this class would ideally be replaced by a generic.
| Modifier | Constructor and Description |
|---|---|
protected |
ByReference(int dataSize)
Allocates memory at this pointer, to contain the pointed-to value.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
toString() |
equals, fromNative, getPointer, hashCode, nativeType, setPointer, toNativeprotected ByReference(int dataSize)
dataSize - The number of bytes to allocate. Must match the byte size of
T in the derived class
setValue(<T>) and
<T> getValue() methods.public java.lang.String toString()
toString in class PointerType