Java 类org.junit.runners.parameterized.BlockJUnit4ClassRunnerWithParametersFactory 实例源码

项目:intellij-ce-playground    文件:Parameterized.java   
public Parameterized(Class<?> klass) throws Throwable {
  super(klass);
  FrameworkMethod parametersMethod = getParametersMethod();
  if (parametersMethod != null) {
    Parameters parameters = parametersMethod.getAnnotation(Parameters.class);
    Method declaredMethod =
      org.junit.runners.Parameterized.class.getDeclaredMethod("createRunnersForParameters", Iterable.class, String.class, ParametersRunnerFactory.class);
    declaredMethod.setAccessible(true);
    l = (List<Runner>)declaredMethod.invoke(this, allParameters(klass, parametersMethod), parameters.name(), BlockJUnit4ClassRunnerWithParametersFactory.class.newInstance());
  }
}