question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Interop: Java setter not seen by ceylon code when it overrides a setter in a java interface

See original GitHub issue

[@jpragey] This one bites when I tried to use jface preferences from ceylon (hence the names). Java code:

public interface MyInterface {
}

public interface MyIPreferencePage {
    public void setContainer(MyInterface preferencePageContainer);
}

public class MyPreferencePage implements MyIPreferencePage {

    private MyInterface intf = null;

    public MyInterface getContainer() {
        return intf;
    }

    public void setContainer(MyInterface container) {
        this.intf = container;
    }
}

called by ceylon code:

shared class MyPrefPage() extends MyPreferencePage() {}

Leads to

[ceylon-compile] /home/jpragey/workspace4/MyApp/build/src/org/myapp/run.ceylon:3: error: formal member setContainer of MyIPreferencePage not implemented in class hierarchy
[ceylon-compile] shared class MyPrefPage() extends MyPreferencePage() {
[ceylon-compile]              ^
[ceylon-compile] 1 error

[Migrated from ceylon/ceylon-compiler#1368]

Issue Analytics

  • State:open
  • Created 10 years ago
  • Comments:32 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
bjansencommented, Feb 17, 2017

It’s now 2017 and I’m also having this problem 😃

0reactions
bjansencommented, Feb 17, 2017

You mean when I don’t refine it?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Interoperation with Java - Eclipse Ceylon
In this chapter, we're going to learn about how to interoperate with native code running on the Java Virtual Machine, and focus on...
Read more >
Why In This Case , Overriding Setter Method Is Not Working
The reason is that return types may be covariant. You can always return a more specific type (i.e. a subtype) when overriding a...
Read more >
Using Java from Ceylon - GitHub
If there is a Java Bean setter that has no corresponding getter (such as in the older parts of the JDK such as...
Read more >
Kotlin properties do not override Java-style getters and setters
Java methods can already override Kotlin properties, so it seems inconsistent that the reverse is not allowed. This is only needed for interoperability...
Read more >
EMF » [XCORE] How to customize/override attribute getter/setter
no special body is generated for the setter valueA. Code: ... If you're hoping to not write any Java code for your more...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found