intarsys nativeC library

de.intarsys.nativec.type
Class NativeType

java.lang.Object
  extended by de.intarsys.nativec.type.NativeType
All Implemented Interfaces:
INativeType
Direct Known Subclasses:
NativeArrayType, NativeBufferType, NativeReferenceType, NativeSimpleType, NativeStructType

public abstract class NativeType
extends Object
implements INativeType

A common superclass for INativeType implementations


Method Summary
 INativeType Array(int size)
          Create a Declaration that represents an array of this.
 INativeObject createNative(INativeHandle handle)
          Create a new INativeObject from a INativeHandle.
 INativeObject createNative(Object value)
          Create an INativeObject for this type from the Java object.
 int getByteCount()
          The size of the type in c memory.
 int getPreferredBoundary()
          The boundary where this type as a struct member would want to be aligned.
static INativeType lookup(Class clazz)
           
 INativeType Ref()
          Create a Declaration that represents a reference to this.
static void register(Class clazz, INativeType type)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

lookup

public static INativeType lookup(Class clazz)

register

public static void register(Class clazz,
                            INativeType type)

Array

public INativeType Array(int size)
Create a Declaration that represents an array of this.

Specified by:
Array in interface INativeType
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 new INativeObject from a INativeHandle.

Specified by:
createNative in interface INativeType
Parameters:
handle - The handle to memory.
Returns:
The new INativeObject

createNative

public INativeObject createNative(Object value)
Description copied from interface: INativeType
Create an INativeObject for this type from the Java object.

Specified by:
createNative in interface INativeType
Returns:
The new INativeObject

getPreferredBoundary

public int getPreferredBoundary()
Description copied from interface: INativeType
The boundary where this type as a struct member would want to be aligned. A structure can override this value with packing.

Specified by:
getPreferredBoundary in interface INativeType
Returns:
The preferred alignment boundary.

getByteCount

public int getByteCount()
Description copied from interface: INativeType
The size of the type in c memory.

Specified by:
getByteCount in interface INativeType
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 interface INativeType
Returns:
Create a Declaration that represents a reference to this.

intarsys nativeC library

Copyright © 2008 intarsys consulting GmbH. All Rights Reserved.