我正在为Android库创建绑定。该库具有以下类:
public interface GenericProcessListener<P, M, D> {
void onStatusChanged(P process, M model, D processDetails);
void onCompleted(P process, M model, D processDetails);
}
在metadata.xml
中,我排除了两种方法:
<remove-node path="/api/package[@name='io.mpos.transactionprovider']/interface[@name='GenericProcessListener']/method[@name='onStatusChanged']" />
<remove-node path="/api/package[@name='io.mpos.transactionprovider']/interface[@name='GenericProcessListener']/method[@name='onCompleted']" />
但是,在编译时,我收到以下错误:
Error: error: GenericProcessListenerImplementor is not abstract and does not override abstract method onCompleted(Object,Object,Object) in GenericProcessListener
GenericProcessListenerImplementor
是由Xamarin生成的类。其内容是
package mono.io.mpos.transactionprovider;
public class GenericProcessListenerImplementor
extends java.lang.Object
implements
mono.android.IGCUserPeer,
io.mpos.transactionprovider.GenericProcessListener
{
/** @hide */
public static final String __md_methods;
static {
__md_methods =
"";
mono.android.Runtime.register
("IO.Mpos.Transactionprovider.IGenericProcessListenerImplementor,
MPOSBindings, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
GenericProcessListenerImplementor.class, __md_methods);
}
public GenericProcessListenerImplementor ()
{
super ();
if (getClass () == GenericProcessListenerImplementor.class)
mono.android.TypeManager.Activate("IO.Mpos.Transactionprovider.IGenericProcessListenerImplementor, MPOSBindings, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null", "", this, new java.lang.Object[] { });
}
private java.util.ArrayList refList;
public void monodroidAddReference (java.lang.Object obj)
{
if (refList == null)
refList = new java.util.ArrayList ();
refList.add (obj);
}
public void monodroidClearReferences ()
{
if (refList != null)
refList.clear ();
}
}
怎么办?不幸的是,我不能排除整个类,因为我需要它的子类。