| 6 | import java.util.*; |
| 7 | |
| 8 | public class Apply { |
| 9 | public static <T, S extends Iterable<T>> |
| 10 | void apply(S seq, Method f, Object... args) { |
| 11 | try { |
| 12 | for(T t: seq) |
| 13 | f.invoke(t, args); |
| 14 | } catch(IllegalAccessException | |
| 15 | IllegalArgumentException | |
| 16 | InvocationTargetException e) { |
| 17 | // Failures are programmer errors |
| 18 | throw new RuntimeException(e); |
| 19 | } |
| 20 | } |
| 21 | } |
nothing calls this directly
no outgoing calls
no test coverage detected