Hi
I'm courious why this code example of builder pattern is breaking
"Missing Static Method In Non Instantiatable Class" rule, it's not that
class cannot be instantiated:
public final class RecipientDTO {
private final Long id;
public static class Builder {
// required parameters
private Long id;
public Builder(final long id) {
this.id = id;
}
public Builder setId(final long id) {
this.id = id;
return this;
}
public final RecipientDTO build() {
return new RecipientDTO(this);
}
}
private RecipientDTO(final Builder builder) {
this.id = builder.id;
}
public Long getId() {
return this.id;
}
}
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email