Skip to content

Generate interfaces and impls for java #158

@MichaelRFairhurst

Description

@MichaelRFairhurst

In wake you can extend a class and/or implement any number of classes. In java you can only implement interfaces and only extend a single class.

This means wake needs to compile to java via both an interface and an implementation.

public interface MyClass { ... }
public class MyInterfaceImpl { ... }

This might mean we always need two output files.

And we must inherit accordingly:

implement MyClass, extends MyClassImpl { ... }

We also need to know what to do when extending/implementing a native js class or interface. Likely we want an annotations to differentiate the two

@JavaInterface("List")
@JavaClass("ArrayList")
extern JavaList:

Looks like interfaces can have static classes so

public interface MyClass {
    public static class Impl {
    }
}

Should do the trick for making it all one file

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions