Hi Steve,
The normal one is <body>. The other two are only used for remapped types (Object, String and Throwable).
They have to the do the weird shape of the type system. E.g. on the Java side it looks like cli.System.Object extends java.lang.Object. This means that you can call java.lang.Object.toString() on a .NET type (that obviously doesn't have this method), so when that happens the <alternateBody> gets invoked.
Similarly, when you extend cli.System.Object in Java and do a super.toString() call, the <nonVirtualAlternateBody> gets invoked.
Regards,
Jeroen
-----Original Message-----
Sent: Thursday, September 8, 2016 18:32
Subject: [Ikvm-developers] map.xml body vs alternateBody vs
nonVirtualAlternateBody
I have a question about the map.xml syntax. What is the difference
between <body>, <alternateBody>. and <nonVirtualAlternateBody>. Some
methods (e.g. toString()) include all three. Under what circumstance is
each used?
Best regards
Steve
------------------------------------------------------------------------------