4

Is there a way to define a Java/Obj-C interface in djinni such that it can be implemented in Java instead of extended. I have run into issues with multiple extension limitations. Though there are work around I would like to know if this is possible.

widget_loader.djinni

widget_loader = interface +j {
    load_widget()
    unload_widget()
}

PurpleWidget.java

public class PurpleWidget extends WidgetLoader {

    @Override
    public void loadWidget()
    {
        loadPurpleWidget()
    }

    @Override
    public void unloadWidget()
    {
        unloadPurpleWidget()
    }

}
running-codebase
  • 998
  • 2
  • 12
  • 17

1 Answers1

4

That's not supported right now. It might be possible to implement as an alternative in Djinni, though there are some features (such as hiding private implementation helpers, and static methods in Java versions <8) which wouldn't be possible in an interface, so would have to be worked around in some way.

Andrew
  • 1,073
  • 7
  • 6