
com.opencredo.concursus.mapping.reflection.MethodInvoking Maven / Gradle / Ivy
The newest version!
package com.opencredo.concursus.mapping.reflection;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.function.BiFunction;
import java.util.function.Function;
@FunctionalInterface
public interface MethodInvoking extends Function {
@SuppressWarnings("unchecked")
static BiFunction invokingInstance(Method method) {
return invokingInstance((Class extends O>) method.getReturnType(), method);
}
static BiFunction invokingInstance(Class extends O> returnType, Method method) {
return (target, args) -> invokingInstance(returnType, target, method).apply(args);
}
@SuppressWarnings("unchecked")
static Function
© 2015 - 2025 Weber Informatics LLC | Privacy Policy