Type mapping between ACDK and Java


| Intro | acdk.java.AcdkObject | acdk::java::JavaObject | Type mapping | Compile acdk_java |

In the interfaces of acdk.java.AcdkObject and acdk::java::JavaObject the arguments, return values and Exception will be mapped from one language to the other.

Content of this chapter:

     Basic Types
     Object types
   Enhanced DMI functions
     Named Parameters

 Basic Types

To enable a generic argument passing from Java to ACDK and vice versa, the basic types will be boxed with the corresponding Object types:
  • boolean to Boolean
  • char to Character
  • byte to Byte
  • short to Short
  • int to Integer
  • float to Float
  • double to Double


Strings will be converted from Java to ACDK.

 Object types

All other object will be converted:
  • From Java java.lang.Boolean, java.lang.Character, java.lang.Byte, java.lang.Short, java.lang.Integer, java.lang.Long, java.lang.Float and java.lang.Double to the corresponding ACDK class.
  • From all other Java java.lang.Object to ACDK acdk::java::JavaObject and vice versa
  • From ACDK acdk::lang::Object to Java acdk.java.AcdkObject


Some basic Exceptions will be automatically converted in the the call interfaces of acdk.java.AcdkObject and acdk::java::JavaObject:
  • java.io.EOFException to and from acdk::io::EOFException
  • java.io.IOException to and from acdk::io::IOException
  • java.lang.Error to and from acdk::lang::Error
  • java.lang.NoSuchMethodException to and from acdk::lang::NoSuchMethodException
  • java.lang.ClassNotFoundException to and from acdk::lang::ClassNotFoundException
  • java.lang.IllegalAccessException to and from acdk::lang::IllegalAccessException
  • java.lang.NullPointerException to and from acdk::lang::NullPointerException
  • java.lang.IndexOutOfBoundsException to and from acdk::lang::IndexOutOfBoundsException
  • java.lang.RuntimeException to and from acdk::lang::RuntimeException
  • java.lang.Exception to and from acdk::lang::Exception
  • java.lang.Throwable to and from acdk::lang::Throwable
Not only the exact types of the exceptions will mapped, but also derived classes to the the best fitting known exception type.

 Enhanced DMI functions


ACDK and Java supports overloading in the DMI interface.

Default values for parameters AcdkObject supports default values for parameters.
JavaObject not tested yet.

 Named Parameters

Not supported in acdk.java.AcdkObject and acdk::java::JavaObject.


There is no type mapping for enhanced Parameter attributes.
The package acdk_java_serialization can be used to serialize ACDK object to Java compatible binary stream.
See:  acdk_java_serialization.