Skip to content

Add method to check if Builder has no missing attributes #755

Closed

Description

It would be nice to have a method to check if Immutable*.Builder.build() would produce an IllegalStateException:

public final isBuildable() {
  return initBits != 0;
}

Activity

  1. added a commit that references this issue on May 17, 2018
  2. elucash commented on May 17, 2018

    @elucash
    Member

    fixed, will be in next milestone (or release) of 2.6.0. The method will not be generated by default, only if naming template specified (the same as for "buildOrThrow")

    @Value.Style(canBuild="isBuildable")

    and builder.isBuildable() with the appropriate check will be generated.

  3. added this to the 2.6 milestone on May 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions