[MDSAL-690] Do not reference concepts.Builder in builders Created: 27/Sep/21  Updated: 17/Jan/22  Resolved: 17/Jan/22

Status: Resolved
Project: mdsal
Component/s: Binding codegen
Affects Version/s: None
Fix Version/s: 9.0.0

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

Issue Links:
Blocks
blocks YANGTOOLS-1327 Deprecate CheckedBuilder and Builder Resolved
is blocked by MDSAL-717 Remove AssertDataObjects Resolved
Epic Link: Remove Builder

 Description   

Our use of Builder concept in generated code has the unfortunate effect that callers of a particular build() method cannot be identified in IDEs, as it will list all builders.

Rather than pulling in this concept, just document the build() method without the tie-in of Builder. Note that builders will need to pick up the Mutable interface to retain the marker.



 Comments   
Comment by Ivan Hrasko [ 04/Nov/21 ]

Does this mean that we are going to replace:

public class FooBuilder implements org.opendaylight.yangtools.concepts.Builder<Foo>

with:

public class FooBuilder implements IFooBuilder

meaning that every Builder has its own interface?

public interface IFooBuilder {
 Foo build();
}
Comment by Robert Varga [ 04/Nov/21 ]

Nope, no new interfaces, just drop the 'implements ... Builder<Foo>' part.

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