code: private static Object invokeNullaryFactoryMethod(final String fqcn, final String methodName) {
          try {
              final Class<?> type = Class.forName(fqcn);
              final Method method = type.getMethod(methodName);
  
              return method.invoke(null);
              // any exception is really unexpected since the type name has
              // already been verified
          } catch (final Exception e) {
              throw new InstantiationException(
                      String.format("Could not create %s#%s(): %s", fqcn, methodName, e), e);
          }
      }
docs: Invokes a nullary static factory method using reflection to stay backwards-compatible with older JDKs.
  
  @param fqcn The fully qualified class name of the type to be produced.
  @param methodName The name of the factory method.
  @return the object produced.