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 forINativeTypeimplementations
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNativeType()protectedNativeType(java.lang.Class<?> instanceClass)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description INativeTypeArray(int size)Create a Declaration that represents an array of this.INativeObjectcreateNative(INativeHandle handle)Create a newINativeObjectfrom aINativeHandle.INativeObjectcreateNative(java.lang.Object value)Create anINativeObjectfor this type from the Java object.intgetByteCount()The size of the type in c memory.static INativeTypelookup(java.lang.Class<?> clazz)INativeTypeRef()Create a Declaration that represents a reference to this.static voidregister(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:
Arrayin 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:INativeTypeCreate a newINativeObjectfrom aINativeHandle.- Specified by:
createNativein interfaceINativeType- Parameters:
handle- The handle to memory.- Returns:
- The new
INativeObject
-
createNative
public INativeObject createNative(java.lang.Object value)
Description copied from interface:INativeTypeCreate anINativeObjectfor this type from the Java object.- Specified by:
createNativein interfaceINativeType- Returns:
- The new
INativeObject
-
getByteCount
public int getByteCount()
Description copied from interface:INativeTypeThe size of the type in c memory.- Specified by:
getByteCountin 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:
Refin interfaceINativeType- Returns:
- Create a Declaration that represents a reference to this.
-
-