Package de.intarsys.nativec.type
Class NativeString
java.lang.Object
de.intarsys.nativec.type.NativeObject
de.intarsys.nativec.type.NativeString
- All Implemented Interfaces:
INativeObject
A wrapper for a C single byte null terminated string.
-
Field Summary
FieldsFields inherited from class de.intarsys.nativec.type.NativeObject
DEBUG, handle, SHIFT_INT, SHIFT_LONG, SHIFT_LONGLONG, SIZE_BYTE, SIZE_INT, SIZE_LONG, SIZE_LONGLONG, SIZE_PTR, SIZE_SHORT
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
NativeString
(NativeStringType pType) protected
NativeString
(NativeStringType pType, INativeHandle handle) protected
NativeString
(NativeStringType pType, String value) NativeString
(String value) -
Method Summary
Modifier and TypeMethodDescriptionstatic NativeString
createFromAddress
(long address) int
The number of bytes occupied by this.The meta information and behavior for the NativeObject.getValue()
A Java side representation from the memory.void
Assign (and marshall to memory) the Java side representation.void
The java object corresponding to this.Methods inherited from class de.intarsys.nativec.type.NativeObject
allocate, cast, createReference, getByte, getByteArray, getBytes, getCLong, getInt, getNativeHandle, getNativeHandle, getShort, getString, getWideString, isNull, setByte, setByteArray, setCLong, setInt, setNativeHandle, setShort, setString, setWideString, toNestedString
-
Field Details
-
META
The meta class instance
-
-
Constructor Details
-
NativeString
-
NativeString
-
NativeString
-
NativeString
-
-
Method Details
-
createFromAddress
-
getByteCount
public int getByteCount()Description copied from class:NativeObject
The number of bytes occupied by this.- Specified by:
getByteCount
in classNativeObject
- Returns:
- The number of bytes occupied by this.
-
getNativeType
Description copied from class:NativeObject
The meta information and behavior for the NativeObject.There is exactly one meta instance for all NativeObject instances of a certain type.
- Specified by:
getNativeType
in interfaceINativeObject
- Specified by:
getNativeType
in classNativeObject
- Returns:
- The meta information and behavior for the NativeObject.
-
getValue
Description copied from interface:INativeObject
A Java side representation from the memory.- Returns:
- A Java side representation for the
INativeObject
.
-
setValue
Description copied from interface:INativeObject
Assign (and marshall to memory) the Java side representation.- Parameters:
value
- The new Java value.
-
setValue
-
stringValue
The java object corresponding to this.- Returns:
- The java object corresponding to this.
-