B - The builder type: the intended effective type of the concrete builder implementation.public class BuilderBase<B extends BuilderBase<B>> extends Object
The main purpose is the realization of a generic builder pattern, whereby there should be methods that should result in this - i.e. the builder instance itself - in order to chain further method calls.
For this purpose, it should be ensured in the constructor that this actually corresponds to the designated type.
| Modifier | Constructor and Description |
|---|---|
protected |
BuilderBase(Class<B> builderClass)
Initializes a new instance and checks the intended builder type for consistency.
|
| Modifier and Type | Method and Description |
|---|---|
protected B |
THIS()
Returns this as an instance of the effective builder type
<B>. |
protected BuilderBase(Class<B> builderClass)
builderClass - The Class representation of the intended effective builder type.IllegalArgumentException - if the given builder class does not represent this instance.protected final B THIS()
<B>.Copyright © 2025 Andreas Kluge-Kaindl, Bremen (de). All rights reserved.