@Test public void shouldNameGenericCollectionUsingOf() throws SecurityException, NoSuchMethodException { assertThat(provider.parameterNamesFor(Cat.class.getDeclaredMethod("fightWith", List.class))[0], is(equalTo("stringList"))); }
public String[] parameterNamesFor(AccessibleObject method) { Type[] parameterTypes = parameterTypes(method); String[] names = new String[parameterTypes.length]; for (int i = 0; i < names.length; i++) { names[i] = extractor.nameFor(parameterTypes[i]); } return names; }
DefaultParameterNameProvider implements ParameterNameProvider { public String[] parameterNamesFor(AccessibleObject method) { Type[] parameterTypes = parameterTypes(method); String[] names = new String[parameterTypes.length]; for (int i = 0; i < names.length; i++) { names[i] = extractor.nameFor(parameterTypes[i]); } return names; } }
DefaultParameterNameProvider implements ParameterNameProvider { public String[] parameterNamesFor(AccessibleObject method) { Type[] parameterTypes = parameterTypes(method); String[] names = new String[parameterTypes.length]; for (int i = 0; i < names.length; i++) { names[i] = extractor.nameFor(parameterTypes[i]); } return names; } DefaultParameterNameProvider(TypeNameExtractor extractor); }
DefaultParameterNameProvider implements ParameterNameProvider { public String[] parameterNamesFor(AccessibleObject method) { Type[] parameterTypes = parameterTypes(method); String[] names = new String[parameterTypes.length]; for (int i = 0; i < names.length; i++) { names[i] = extractor.nameFor(parameterTypes[i]); } return names; } DefaultParameterNameProvider(TypeNameExtractor extractor); String[] parameterNamesFor(AccessibleObject method); }
DefaultParameterNameProvider implements ParameterNameProvider { public String[] parameterNamesFor(AccessibleObject method) { Type[] parameterTypes = parameterTypes(method); String[] names = new String[parameterTypes.length]; for (int i = 0; i < names.length; i++) { names[i] = extractor.nameFor(parameterTypes[i]); } return names; } DefaultParameterNameProvider(TypeNameExtractor extractor); String[] parameterNamesFor(AccessibleObject method);  }