I have a situation where I use a builder pattern for constructing an object. Best example to give is the pizza code
public class Pizza {
private int size;
pr
It's possible that you haven't seen the builder pattern with setters because your sources might be strongly tied to the example published by the GoF. There can be many variations of the builder pattern, and this true for any design pattern. The builder pattern is obviously a creational pattern, but the main intent of the builder pattern is to solve the problem of telescoping constuctors. It's also a good pattern when you need construction in a very controlled and incremental fashion. None of these things which I have just mentioned are invalidated by having setters. One useful variation of the pattern is to have setters (via builder) which allow preparing the object state and then have a build method which builds/ instantiates the target object. The build method incrementally creates and possibly validates the final object. Take the following as an example:
Pizza pizza = pizzaBuilder.newBuilder().addCheese().addPepperoni().addBacon().Build();
The example above makes good use of the builder pattern using Java language constructs. It's quite common actually.