code: @SuppressWarnings({"unchecked"})
      private static <T> Class<T> bruteForceDefineClass(Method method, ClassLoader loader, Object... args)
              throws InvocationTargetException, IllegalAccessException {
  
          LOCK.lock();
          try {
              assert !method.isAccessible() : "This method shouldn't be left accessible, something is wrong!";
              method.setAccessible(true);
              Class<T> cls = (Class<T>) method.invoke(loader, args);
              method.setAccessible(false);
              return cls;
          } finally {
              LOCK.unlock();
          }
      }
docs: -------------------------------------------------------------