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

Remove concepts.Builder and concepts.CheckedBuilder

    XMLWordPrintable

Details

    • Epic
    • Status: Resolved
    • High
    • Resolution: Done
    • None
    • 9.0.0
    • None
    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: