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.

Clone EpoxyModel with @EpoxyClass annotation

See original GitHub issue

Is there a way to clone an EpoxyModel with generated attributes.

Something like this in PhotoModel.java:

    @Override public Object clone() {
        return new PhotoModel_()
              .id(this.id())
              .title(this.title)
              .imageUrl(this.imageUrl);
    }

Because generated class in PhotoModel_.java calls this, instead of the super.clone() method.

  @Override
  public PhotoModel_ clone() {
    super.clone();
    return this;
  }

Is there a way to not generate overriden function?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
geralt-encorecommented, May 16, 2017

I can look into it after the #198 😃

0reactions
geralt-encorecommented, May 17, 2017

Oh, I missed it somehow. Making method final is a really nice solution.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

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