Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-1322

Remove concepts.Builder and concepts.CheckedBuilder

XMLWordPrintable

    • Icon: Epic Epic
    • Resolution: Done
    • Icon: High High
    • 9.0.0
    • None
    • None
    • Remove Builder

      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.

            rovarga Robert Varga
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: