code: public static <T> T getDelegate(Class<T> delegateClass, String className, String defaultDelegateClass) {
          if (className == null)
              className = defaultDelegateClass;
  
          try {
              return Class.forName(className).asSubclass(delegateClass).newInstance();
          } catch (Throwable e) {
              System.err.println("Unable to locate configured delegate: " + delegateClass + ", " + e);
          }
          return null;
      }
docs: Create a delegate instance of the specified (or default) delegate class.
  
  @param delegate Specifically configured delegate class
  @param defaultDelegateClass Default delegate class
  @return constructed delegate instance