de.intarsys.nativec.type
Class NativeReferenceType

java.lang.Object
  extended by de.intarsys.nativec.type.NativeType
      extended by de.intarsys.nativec.type.NativeReferenceType
All Implemented Interfaces:
INativeType

public class NativeReferenceType
extends NativeType

A declaration for a slot containing a reference to a native object.


Constructor Summary
protected NativeReferenceType(INativeType baseDeclaration)
          Declare a reference to a base type
 
Method Summary
static NativeReferenceType create(INativeType baseType)
           
 INativeObject createNative(INativeHandle handle)
          Create a new INativeObject from a INativeHandle.
 INativeObject createNative(java.lang.Object value)
          Create an INativeObject for this type from the Java object.
 INativeType getBaseType()
           
 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.
 
Methods inherited from class de.intarsys.nativec.type.NativeType
Array, lookup, Ref, register
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NativeReferenceType

protected NativeReferenceType(INativeType baseDeclaration)
Declare a reference to a base type

Method Detail

create

public static NativeReferenceType create(INativeType baseType)

createNative

public INativeObject createNative(INativeHandle handle)
Description copied from interface: INativeType
Create a new INativeObject from a INativeHandle.

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

createNative

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

Specified by:
createNative in interface INativeType
Overrides:
createNative in class NativeType
Returns:
The new INativeObject

getBaseType

public INativeType getBaseType()

getByteCount

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

Specified by:
getByteCount in interface INativeType
Overrides:
getByteCount in class NativeType
Returns:
The size of the type in c memory.

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.

Returns:
The preferred alignment boundary.