FreeBuilder Versions Save

Automatic generation of the Builder pattern for Java

v2.8.0

1 year ago

This release adds support for Jackson's JsonAlias annotation (issue #460).

v2.7.0

3 years ago

With this release, FreeBuilder can generate builders without the standard public methods build, buildPartial, clear and mergeFrom, allowing you to give them alternative names. (Note that doing so will disable enhanced support for nested builders for this type, as it needs to be able to call these methods.)

public interface MyType {
  class Builder extends MyType_Builder {
    public OtherDataType build() {
      // This signature is not compatible with the default build method.
      // FreeBuilder will instead declare a package-scoped _buildImpl.
      ...
    }
    public DataType buildMyType() {
      return _buildImpl();
    }
  }
}

v2.6.2

3 years ago

This release fixes a couple of bugs in the support for Guava's BiMap type introduced in v2.6.0:

  • The put methods no longer throw an exception if the key-value pair already exists in the bimap (only if the value exists and is associated with a different key).
  • When a check constraint is in place, setValue on the Map.Entry objects returned by the temporary bimap object passed into the mutate method now correctly return the old value.

Thanks to @thespags for the fixes!

v2.6.1

4 years ago

Mistaken re-release of v2.6.0. No bug fixes or new features.

v2.6.0

4 years ago

This release adds support for Guava's BiMap type (issue #418). Thanks to @thespags for doing most of the legwork on this feature!

Note that the FreeBuilder README for previous releases erroneously stated that calling the putX method on a Map type would throw an IllegalArgumentException if the key was already present in the map. This did not match the generated JavaDoc and was not correct. The entry will be replaced in these cases, and no error will be thrown.

v2.5.0

4 years ago

This release adds support for Jackson's JsonAnyGetter annotation (issue #104). Thanks to @mgorniew for implementing this feature!

v2.4.1

5 years ago

This release fixes a bug where the new @IgnoredByEquals and @NotInToString were accidentally being treated as inherited annotations in batch compilation.

v2.4.0

5 years ago

This release adds @IgnoredByEquals and @NotInToString annotations to remove properties from the generated equals/hashCode/toString implementations (#54). Thanks to @thespags for the patch!

v2.3.0

5 years ago

This release adds the ability to pass partials to the static Builder.from method (#407), reducing the fragility of tests of modify-rebuild code without requiring the optional toBuilder method. See the 2.3 release notes for more information.

v2.2.3

5 years ago

This release makes the optional toBuilder method more efficient (#403), and improves the generated JavaDoc on several methods (#402, #406).