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)

JDefaultBandwidthMeter = interface(JBandwidthMeter)
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.