com.smardec.j2native
Class J2NativeContext

java.lang.Object
  |
  +--com.smardec.j2native.J2NativeContext

public class J2NativeContext
extends java.lang.Object

J2NativeContext class is a platform dependent context. Class contains machine specific information, such as length of int or double.


Method Summary
static int getAlignedArgumentLength(int argLen)
          Calculate and returns aligned argument length.
static byte getArgumentAlignment()
          Returns alignment of argument.
static int getBoolLength()
          Returns length of boolean in bytes.
static byte getByteLength()
          Returns length of byte in bytes.
static byte getDefaultCallingConvention()
          Returns default calling convention for the native pat.
static short getDefaultStructureAlignment()
          Returns alignment of structure.
static int getDoubleLength()
          Returns length of double in bytes.
static int getFloatLength()
          Returns length of float in bytes.
static int getIntLength()
          Returns length of int in bytes.
static int getLongDoubleLength()
          Returns length of long double in bytes.
static int getLongLength()
          Returns length of long int in bytes.
static int getPointerLength()
          Returns length of pointer in bytes.
static int getShortLength()
          Returns length of short int in bytes.
static byte getWideCharLength()
          Returns length of wide char in bytes.
static int strlen(long l)
          Calls corresponding C function.
static int wcslen(long l)
          Calls corresponding C function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getByteLength

public static byte getByteLength()
Returns length of byte in bytes.

Returns:
length in bytes

getWideCharLength

public static byte getWideCharLength()
Returns length of wide char in bytes.

Returns:
length in bytes

getBoolLength

public static int getBoolLength()
Returns length of boolean in bytes.

Returns:
length in bytes

getPointerLength

public static int getPointerLength()
Returns length of pointer in bytes.

Returns:
length in bytes

getShortLength

public static int getShortLength()
Returns length of short int in bytes.

Returns:
length in bytes

getIntLength

public static int getIntLength()
Returns length of int in bytes.

Returns:
length in bytes

getLongLength

public static int getLongLength()
Returns length of long int in bytes.

Returns:
length in bytes

getFloatLength

public static int getFloatLength()
Returns length of float in bytes.

Returns:
length in bytes

getDoubleLength

public static int getDoubleLength()
Returns length of double in bytes.

Returns:
length in bytes

getLongDoubleLength

public static int getLongDoubleLength()
Returns length of long double in bytes.

Returns:
length in bytes

getArgumentAlignment

public static byte getArgumentAlignment()
Returns alignment of argument.

Returns:
alignment in bytes

getDefaultStructureAlignment

public static short getDefaultStructureAlignment()
Returns alignment of structure.

Returns:
alignment in bytes

getDefaultCallingConvention

public static byte getDefaultCallingConvention()
Returns default calling convention for the native pat.

Returns:
calling convention
See Also:
Function.CDECL_CALLING_CONVENTION, Function.STDCALL_CALLING_CONVENTION, Function.PASCAL_CALLING_CONVENTION

getAlignedArgumentLength

public static int getAlignedArgumentLength(int argLen)
Calculate and returns aligned argument length.

Returns:
length in bytes

strlen

public static int strlen(long l)
Calls corresponding C function.


wcslen

public static int wcslen(long l)
Calls corresponding C function.



Copyright © 2004-2006 Smardec. All Rights Reserved.