String and complex data types in Map.xml for IKVM!

2019-02-28 16:25发布

问题:

I am using IKVM to transform my java .jar file to a .NET .dll file. I can create a property from the getter and setters of integer types .. But am not able to do so for string data type in the java code. Can you please tell me what is the format to be used in the map.xml for string or complex data type for IKVM!!

回答1:

For non-primitive types the signature representation is "L" + type name + ";". Here's an example:

   <property name="Foo" sig="()Ljava.lang.String;">
     <getter name="getFoo" sig="()Ljava.lang.String;" />
     <setter name="setFoo" sig="(Ljava.lang.String;)V" />
   </property>

For an array type, prefix the element type signature representation with "[".