-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Labels
generatorIssues binding a Java library (generator, class-parse, etc.)Issues binding a Java library (generator, class-parse, etc.)
Description
Consider the BouncyCastle-provided bcprov-ext-jdk15on-161.jar. This Java library contains a type equivalent to:
/* partial */ interface X509AttributeCertificate extends java.security.cert.X509Extension {
}Which looks fine enough, except that it implements the IX509Extension interface, which has two properties which are generic types:
partial interface IX509Extension {
ICollection<string> CriticalExtensionOIDs {get;}
ICollection<string> NonCriticalExtensionOIDs {get;}
}Unfortunately, generator's support for C# generic methods results in the resulting binding...not being valid C# code:
internal partial class internal class IX509AttributeCertificateInvoker : global::Java.Lang.Object, IX509AttributeCertificate {
IntPtr id_getCriticalExtensionOIDs;
public unsafe global::System.Collections.Generic.ICollection`1<global::System.String> CriticalExtensionOIDs {
get {
if (id_getCriticalExtensionOIDs == IntPtr.Zero)
id_getCriticalExtensionOIDs = JNIEnv.GetMethodID (class_ref, "getCriticalExtensionOIDs", "()Ljava/util/Set;");
return global::Android.Runtime.JavaSet.FromJniHandle (JNIEnv.CallObjectMethod (((global::Java.Lang.Object) this).Handle, id_getCriticalExtensionOIDs), JniHandleOwnership.TransferLocalRef);
}
}
}The string global::System.Collections.Generic.ICollection`1<global::System.String> is not a valid C# type -- the ICollection`1<global::System.String> needs to be ICollection<global::System.String> -- which prevents the binding from compiling. (Along with a host of other issues, all of which should be addressed as well.)
generator needs to be fixed so that this can be properly supported.
AmrAlSayed0
Metadata
Metadata
Assignees
Labels
generatorIssues binding a Java library (generator, class-parse, etc.)Issues binding a Java library (generator, class-parse, etc.)