(Function<A, B> f)
| 201 | } |
| 202 | return true; |
| 203 | } |
| 204 | |
| 205 | static public <A, B> Pair<List<Class>, List<Class>> function(Function<A, B> f) { |
| 206 | Type inter = f.getClass() |
| 207 | .getGenericInterfaces()[0]; |
| 208 | |
| 209 | if (inter instanceof Class) |
| 210 | throw new IllegalArgumentException("alas, you can't pass in a lambda to function <" + inter + ">"); |
| 211 | |
| 212 | Type[] at = ((ParameterizedType) inter).getActualTypeArguments(); |
| 213 | |
| 214 | return new Pair<>(linearize(at[0]), linearize(at[1])); |
| 215 | } |
| 216 |
no test coverage detected