code: @SuppressWarnings("rawtypes")
      public static <T, B extends ThreadLocalBuilder<T>> T buildGeneric(
              final Class<? extends ThreadLocalBuilder> threadLocalBuilderClass,
              final Consumer<B> builderConsumer) {
  
          // Look-up the thread local builder's instance queue
          @SuppressWarnings("unchecked")
          final Class<? extends ThreadLocalBuilder<?>> genericThreadLocalBuilderClass =
                  (Class<? extends ThreadLocalBuilder<?>>) threadLocalBuilderClass;
          final Queue<ThreadLocalBuilder<?>> instanceQueue = THREAD_LOCAL_BUILDERS_BY_TYPE.get().computeIfAbsent(
                  genericThreadLocalBuilderClass,
                  key -> new LinkedList<>());
  
          // Pull an instance from the queue or create one if one does not exist
          @Nullable ThreadLocalBuilder<?> threadLocalBuilder = instanceQueue.poll();
          if (threadLocalBuilder == null) {
              threadLocalBuilder = instantiateBuilder(threadLocalBuilderClass);
          }
  
          // Reset the builder instance
          threadLocalBuilder.reset();
  
          try {
              // Consume the instance and build
              @SuppressWarnings("unchecked")
              final B castThreadLocalBuilder = (B) threadLocalBuilder;
              builderConsumer.accept(castThreadLocalBuilder);
              threadLocalBuilder._isThreadLocalBuild = true;
              return castThreadLocalBuilder.build();
          } finally {
              // Return the builder instance to the queue
              threadLocalBuilder._isThreadLocalBuild = false;
              instanceQueue.add(threadLocalBuilder);
          }
      }
docs: Consume an instance of the provided builder class after resetting it and
  return the instance resulting from building the builder.
  
  This version does not infer types and the return type and builder type
  must be specified by the caller. This decouples {@code <T>} from
  {@code <B>} allowing the return type {@code <T>} to be parameterized.
  This is necessary due to type-erasure where Java {@code Class} instances
  do not capture generic parameters. If {@code <T>} is not parameterized
  then you should use {@code build} instead.
  
  @param <T> The type of object created by the builder.
  @param <B> The type of the  builder used.
  @param threadLocalBuilderClass The {@code Class<>} instance for the builder to use.
  @param builderConsumer The {@code Consumer} for the builder instance.
  @return The instance of {@code <T>} build from the builder after consuming it.