[YANGTOOLS-1322] Remove concepts.Builder and concepts.CheckedBuilder Created: 27/Sep/21  Updated: 23/Nov/23  Resolved: 23/Apr/22

Status: Resolved
Project: yangtools
Component/s: None
Affects Version/s: None
Fix Version/s: 9.0.0

Type: Epic Priority: High
Reporter: Robert Varga Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: pt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Name: Remove Builder

 Description   

Our yantools.concepts.(Checked)Builder interface codifies a part of the Builder Pattern, specifically the existence of a build() method and the fact builders are Mutable.

Unfortunately this is an over-broad specification, which does not bring much to the table in terms of where an API would use a generic Builder. Over the years we have improved Builder to be an unchecked specialization of CheckedBuilder, but that does not cover further use cases, where the build() method would be more polymorphic, like accepting a mandatory argument, or similar.

A huge downside of this interface's proliferation is that attempting to find callers of a particular .build() method are useless – IDEs will identify callers of all Builder.build() method.

Gradually deprecate and eventually remove concepts.CheckedBuilder and concepts.Builder, as well as any non-specific interfaces hanging off of them.



 Comments   
Comment by Robert Varga [ 27/Sep/21 ]

Preliminary target is yangtools-9.0.0, but it may be pushed back if we fail to deliver YANGTOOLS-1328 in yangtools-8.0.0.

Generated at Wed Feb 07 20:55:49 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.