private static <R extends ReflectiveVisitor, E> VisitDispatcher<R, E> createDispatcher(
      final Class<R> visitorBaseClazz,
      final Class<E> visiteeBaseClazz) {
    assert ReflectiveVisitor.class.isAssignableFrom(visitorBaseClazz);
    assert Object.class.isAssignableFrom(visiteeBaseClazz);
    return new VisitDispatcher<>();
  }
Creates a dispatcher for calls to {@link VisitDispatcher#lookupVisitFunc}. The
dispatcher caches methods between invocations and it is thread-safe.

@param visitorBaseClazz Visitor base class
@param visiteeBaseClazz Visitee base class
@return cache of methods
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveReflectUtil.java