code: @SuppressWarnings("unchecked")
      private static <T> Constructor<T>[] getConstructorsToOverwrite(Class<T> clazz) {
          return (Constructor<T>[]) clazz.getDeclaredConstructors();
      }
docs: hence this cast is safe.