analytically/innerbuilder

Plugin generates copy constructors and use getXXX instead of isXXX for primitive boolean

Opened this issue · 0 comments

Version 1.1.5

Following code is generated by the plugin

public class Todo {
    
    private boolean empty;

    private Todo(Builder builder) {
        empty = builder.empty;
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    public static Builder newBuilder(Todo copy) {
        Builder builder = new Builder();
        builder.empty = copy.getEmpty();
        return builder;
    }


    public static final class Builder {
        private boolean empty;

        private Builder() {
        }

        public Builder empty(boolean val) {
            empty = val;
            return this;
        }

        public Todo build() {
            return new Todo(this);
        }
    }
}