MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / function

Method function

src/main/java/field/utility/Conversions.java:203–213  ·  view source on GitHub ↗
(Function<A, B> f)

Source from the content-addressed store, hash-verified

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

Callers 1

provideConversionMethod · 0.95

Calls 1

linearizeMethod · 0.95

Tested by

no test coverage detected