[mono-android] Binding classes don't implement Java.Lang.IComparable

Atsushi Eno atsushieno at veritas-vos-liberabit.com
Wed Oct 31 19:25:18 UTC 2012


Hello,

That is a known limitation. The thing is, *generics don't really exist* 
in compiled java classes and we always need to explicitly supply which 
class the Comparable compares.

Hence the solution is, you add appropriate instantiated generic 
interface to Metadata.xml. This is an example:

<attr 
path="/api/package[@name='android.content']/class[@name='ComponentName']/implements[@name='java.lang.Comparable']" 
name="name">java.lang.Comparable<android.content.ComponentName></attr>

Atsushi Eno

Jeremy A. Kolb - ARA/NED wrote:
>
> I’m trying to bind droidtext (http://code.google.com/p/droidtext) and 
> having a lot of trouble with classes not implementing 
> Java.Lang.IComparable.CompareTo. I can look at the java files and see 
> that the functions are implemented and public but bindings aren’t 
> being generated for them. Has anyone seen this before? I don’t see 
> anything in the logs about why this function isn’t being picked up.
>
>
>
> _______________________________________________
> Monodroid mailing list
> Monodroid at lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid



More information about the Monodroid mailing list