public abstract class NativeStruct extends NativeObject
NativeObject
instances. These objects are built using named slots
with other INativeObject
instances (as opposed to NativeArray
,
using indexed slots).Modifier and Type | Field and Description |
---|---|
static NativeStructType |
META
The meta class instance
|
protected INativeObject[] |
values |
DEBUG, handle, SHIFT_INT, SHIFT_LONG, SHIFT_LONGLONG, SIZE_BYTE, SIZE_INT, SIZE_LONG, SIZE_LONGLONG, SIZE_PTR, SIZE_SHORT
Constructor and Description |
---|
NativeStruct() |
NativeStruct(INativeHandle handle) |
Modifier and Type | Method and Description |
---|---|
int |
getByteCount()
The number of bytes occupied by this.
|
INativeObject |
getNativeObject(java.lang.String name)
The NativeObject at the named slot name.
|
protected StructMember |
getStructField(java.lang.String name) |
NativeStructType |
getStructType() |
java.lang.Object |
getValue()
A Java side representation from the memory.
|
void |
setValue(java.lang.Object value)
Assign (and marshall to memory) the Java side representation.
|
java.lang.String |
toNestedString()
A string for debugging purposes.
|
java.lang.String |
toString() |
allocate, cast, createReference, getByte, getByteArray, getBytes, getCLong, getInt, getNativeHandle, getNativeHandle, getNativeType, getShort, getString, getWideString, isNull, setByte, setByteArray, setCLong, setInt, setNativeHandle, setShort, setString, setWideString
public static final NativeStructType META
protected INativeObject[] values
public NativeStruct()
public NativeStruct(INativeHandle handle)
public int getByteCount()
NativeObject
getByteCount
in class NativeObject
public INativeObject getNativeObject(java.lang.String name)
The marshalling is delegated to the StructMember in the StructDeclaration.
name
- The name of the slot in the structure.protected StructMember getStructField(java.lang.String name)
public NativeStructType getStructType()
public java.lang.Object getValue()
INativeObject
INativeObject
.public void setValue(java.lang.Object value)
INativeObject
value
- The new Java value.public java.lang.String toNestedString()
NativeObject
toNestedString
in class NativeObject
public java.lang.String toString()
toString
in class java.lang.Object