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.

@Builder on constructors/methods is not recognized in Android Studio

See original GitHub issue

It seems the plugin does not recognize the @Builder annotation on constructors. That works similarly to @Builder on static methods.

public class Test {
    private  int a;

    @Builder
    private Test(int a) {
        this.a = a;
    }
}

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
mg6maciejcommented, May 2, 2015

Just tried it on AS 1.2 with the latest lombok plugin and have no errors shown in the IDE.

Test.builder().a(6).build();

Works with both @lombok.Builder and deprecated @lombok.experimental.Builder.

0reactions
mplushnikovcommented, Jun 30, 2015

Version 0.9.5 should be available now, please verify it if you can.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The method builder() is undefined for the type BuilderExample
In this code it shows an error The method builder() is undefined for the type BuilderExample Exception in thread "main" java.lang.Error: ...
Read more >
@Builder - Project Lombok
@Builder can generate so-called 'singular' methods for collection parameters/fields.
Read more >
AlertDialog.Builder - Android Developers
Public constructors; Public methods; Inherited methods. Public constructors. Builder; Builder ... Calling this method does not display the dialog.
Read more >
Replace constructor with builder | IntelliJ IDEA Documentation
Builder class name. Type here the fully qualified name of the desired builder class that already exists in your project, or click the...
Read more >
Groovy Language Documentation
Type checking assignments; List and map constructors; Method resolution ... Example using simplifying strategies; When not to use; Going further.
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