code: @SuppressFBWarnings(value = "DP_DO_INSIDE_DO_PRIVILEGED", justification = "EV is run only from within unit tests")
      @SuppressWarnings("unchecked")
      public <T> T callFactory(String factoryTypeName, String factoryMethod, Class<?>[] paramTypes, Object[] paramValues) {
          try {
              Class<T> type = resolve();
              if (type == null) {
                  return null;
              }
              Class<?> factoryType = Class.forName(factoryTypeName);
              Method factory = factoryType.getMethod(factoryMethod, paramTypes);
              factory.setAccessible(true);
              return (T)factory.invoke(null, paramValues);
          }
          catch (Exception e) {
              return handleException(e);
          }
      }
docs: Attempts to call a static factory method on a type.
  
  @param <T>
  The return type of the factory method.
  @param factoryTypeName
  The type that contains the factory method.
  @param factoryMethod
  The name of the factory method.
  @param paramTypes
  The types of the parameters of the specific overload of the
  factory method we want to call.
  @param paramValues
  The values that we want to pass into the factory method.
  @return An instance of the type given by the factory method with the
  given parameter values, or null of the type does not exist.
  @throws ReflectionException
  If the call to the factory method fails.