corner imagecorner image
IDEPlatformPluginsDocs & SupportCommunityPartners

Builder - plugin detail

Generates a static Builder constructor

NetBeans Plugin - Builder
Plugin owner: asd1530
Website:
Added: 2011-07-17
Last updated: 2011-07-30
NetBeans Versions: 7.0
License: Open Source
Category: Code Generation
Size: 0.01 MB
Downloaded: 307 times
Rating:
 4.18, by 2 users


Download plugin

Verifications for NetBeans versions

Plugin is not subject to any verification

Introduction

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

What's new in this version

corrected the library versions

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

User Comments

  

Configurable?

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": http://www.informit.com/articles/article.aspx?p=1216151&seqNum=2
Posted by Battlestar84 on Aug 09, 2011