aiguofer commented on issue #34778:
URL: https://github.com/apache/arrow/issues/34778#issuecomment-1491080575

   @lidavidm I've been struggling with generics and how to store the hook from 
`withTransportHook(Consumer<T> hook)` for later use in `.build()`.
   
   Is it safe to assume in the future all builders will be either 
`AbstractServerImplBuilder` or `ServerBuilder`? That would make it a lot easier 
to do something like:
   
   ```
       public Builder withTransportHook(Consumer<ServerBuilder<?>> hook) {
         this.transportHook = hook;
         return this;
       }
   ```
   and in `build()`:
   ```
         transportHook.accept(builder);
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to