How to convert special java interface to pascal interface?

  

I have those 2 interfaces

public interface TransferListener<S> {

}

public interface BandwidthMeter {

}

and this implementation :

public final class DefaultBandwidthMeter implements BandwidthMeter, TransferListener<Object> {
….
}

How can i declare the pascal version of DefaultBandwidthMeter ?

Right now i declare it like this :

JDefaultBandwidthMeterClass = interface(JBandwidthMeterClass)
[‘{2B9F65F5-8EAB-466A-9A2E-DDD9CA88F807}’]
end;

[JavaSignature(‘com/google/android/exoplayer2/upstream/DefaultBandwidthMeter’)]
JDefaultBandwidthMeter = interface(JBandwidthMeter)
[‘{D6A32707-D8F6-458B-AAB6-926A523D1A95}’]
end;
TJDefaultBandwidthMeter = class(TJavaGenericImport<JDefaultBandwidthMeterClass, JDefaultBandwidthMeter>) end;

But the problem is that this declaration don’t care about TransferListener and will not work with function like:

public DefaultDataSourceFactory(TransferListener<? super DataSource> listener) {

}

So how can i do ?

Comments are closed.