-
Notifications
You must be signed in to change notification settings - Fork 489
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Few enhancements in the builder framework
- Infer the type of the Args class by looking it up through reflection (`getEnclosingClass()`), so that there is no need for concrete builder classes to implement the `build()` method. - Change the generic type notations `<T, B>` to `<B, A>` to make them more intuitive (`B -> Builder` and `A -> Args`) - When inheriting from a parent builder class in an abstract builder class like `BucketArgs.Builder`, pass the type parameters of the current class (`<B, A>`) as is. This ensures that the builder methods, irrespective of what order they're called in, will always return an object with type of the original builder class.
- Loading branch information
1 parent
8d139d4
commit 18debd6
Showing
3 changed files
with
14 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters