Package de.intarsys.nativec.type
Class NativeType
- java.lang.Object
-
- de.intarsys.nativec.type.NativeType
-
- All Implemented Interfaces:
INativeType
- Direct Known Subclasses:
NativeAbstractStringType
,NativeArrayType
,NativeBufferType
,NativeReferenceType
,NativeSimpleType
,NativeStructType
public abstract class NativeType extends java.lang.Object implements INativeType
A common superclass forINativeType
implementations
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
NativeType()
protected
NativeType(java.lang.Class<?> instanceClass)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description INativeType
Array(int size)
Create a Declaration that represents an array of this.INativeObject
createNative(INativeHandle handle)
Create a newINativeObject
from aINativeHandle
.INativeObject
createNative(java.lang.Object value)
Create anINativeObject
for this type from the Java object.int
getByteCount()
The size of the type in c memory.static INativeType
lookup(java.lang.Class<?> clazz)
INativeType
Ref()
Create a Declaration that represents a reference to this.static void
register(java.lang.Class<?> clazz, INativeType type)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.intarsys.nativec.type.INativeType
getPreferredBoundary
-
-
-
-
Method Detail
-
lookup
public static INativeType lookup(java.lang.Class<?> clazz)
-
register
public static void register(java.lang.Class<?> clazz, INativeType type)
-
Array
public INativeType Array(int size)
Create a Declaration that represents an array of this.- Specified by:
Array
in interfaceINativeType
- Parameters:
size
- The predefined size for the array.- Returns:
- Create a Declaration that represents an array of this.
-
createNative
public INativeObject createNative(INativeHandle handle)
Description copied from interface:INativeType
Create a newINativeObject
from aINativeHandle
.- Specified by:
createNative
in interfaceINativeType
- Parameters:
handle
- The handle to memory.- Returns:
- The new
INativeObject
-
createNative
public INativeObject createNative(java.lang.Object value)
Description copied from interface:INativeType
Create anINativeObject
for this type from the Java object.- Specified by:
createNative
in interfaceINativeType
- Returns:
- The new
INativeObject
-
getByteCount
public int getByteCount()
Description copied from interface:INativeType
The size of the type in c memory.- Specified by:
getByteCount
in interfaceINativeType
- Returns:
- The size of the type in c memory.
-
Ref
public INativeType Ref()
Create a Declaration that represents a reference to this.- Specified by:
Ref
in interfaceINativeType
- Returns:
- Create a Declaration that represents a reference to this.
-
-