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.

Codegeneration for Inner classes extending from MvpView

See original GitHub issue

I have such interface:

public interface Contract {
    interface View extends MvpView {                                           
        void setLoadingIndicator(boolean active);                               
    }                                                                           
    interface Presenter {                                                       
        ...
    }                                                                       
}

Also, i have a presenter

@InjectViewState                                                                
public class Presenter
        extends AbstractPresenter<Contract.View> implements Contract.Presenter {

When i build project, the error occurs: it can not find variable “View” in the generated code for Contract$View$$ViewState class.

If i refactor Contract.View to simple ContractView interface, then everything works fine.

Is this my mistake or moxy does not support code generation for nested interfaces?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

3reactions
c0defathercommented, Jul 23, 2018

Hi, this works in 1.4.6, but fails in 1.5.5. Would you mind to fix this? Thanks!

0reactions
s-ilnarcommented, May 29, 2019

Copy paste^) but fails in 1.7.0. Would you mind to fix this? Thanks!

or is it a problem specific implementation -ech.schoolhelper:moxy?

    implementation 'tech.schoolhelper:moxy-x:1.7.0'
    annotationProcessor 'tech.schoolhelper:moxy-x-compiler:1.7.0'
    implementation 'tech.schoolhelper:moxy-x-androidx:1.7.0'
Read more comments on GitHub >

github_iconTop Results From Across the Web

How does extending outer class works in java - Stack Overflow
An inner class has a reference to an instance of its outer class. This is a has-a relationship. If it extends its outer...
Read more >
Inner Classes - Learning Java [Book] - O'Reilly
The class body becomes an inner class, which either extends the specified class or, in the case of an interface, is expected to...
Read more >
Nested Classes - Java/Swing GUI Designer - JFormDesigner
In JFormDesigner you can specify a nested class for each component. You do this in the Code Generation category in the Properties view....
Read more >
Joda-Beans – User guide - Code generation
The class must be a normal top-level class, nested/inner classes and multiple classes per file are not supported; Each property field must ...
Read more >
Nested Classes - Learning the Java Language
A nested class is a member of its enclosing class. Non-static nested classes (inner classes) have access to other members of the enclosing...
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