Builder - plugin detail

Generates a static Builder constructor

NetBeans Plugin - Builder
Plugin owner: asd1530
Added: 2011-07-17
License: Open Source
Category: Code Generation
Downloaded: 4,747 times
 4.39, by 4 users

Plugin Log Show log

Versions available

Download plugin   Download size: 0.03 MB   Last Update: 2013-02-27

This plugin is also available on the NetBeans Plugin Portal Update Center. Use 'Tools > Plugins' action from the NetBeans IDE main menu for convenient installation of this plugin

What's new in this version

I re-wrote the entire code usinf NB 7.3 also singned it

Verifications for NetBeans versions

7.3 verification PASSED See verification details
Download plugin   Download size: 0.01 MB   Last Update: 2011-07-30

What's new in this version

corrected the library versions

Verifications for NetBeans versions

Plugin is not subject to any verification


it adds a new "Generate code" (Alt+Ins ) called generate builder. It generates a static Builder for the current class. after this the class can be instantiated like this YourClass yc=new YourClass.Builder().withProp1(valProp1).withProp2(valProp2).build(); You may also add validation logic in the [with...] methods

[ You have to be logged in to be able to comment. ]

User Comments


Support Netbeans 7.4

Is it planned to support Netbeans 7.4 ?
I've installed it manually and it works well.

The only drawback I found is that the generated builder includes code for static fields.
Posted by moghrabi on Nov 29, 2013

Can we change it from .withProp1 to -> .prop1

Would that be easier?

If you give me the source code, i could probably do it myself.
Posted by pablopina on Jan 27, 2013


Good work! It would be even better to change the "template" for the builder variant which is used. Because I always implement Builders for immutable Objects with final fields. And that needs a special Builder like the one which Joshua Bloch introduced in his book "Effective Java":
Posted by Battlestar84 on Aug 09, 2011