All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.rbkmoney.woody.api.proxy.MethodCallerFactory Maven / Gradle / Ivy

There is a newer version: 1.1.23
Show newest version
package com.rbkmoney.woody.api.proxy;

import java.lang.reflect.Method;
import java.util.function.BiFunction;

public interface MethodCallerFactory {
    InstanceMethodCaller getInstance(InvocationTargetProvider targetProvider, Method method);

    default InstanceMethodCaller getInstance(InvocationTargetProvider targetProvider, Method method, BiFunction function) {
        return new InstanceMethodCaller(method) {
            @Override
            public Object call(Object source, Object[] args) throws Throwable {
                return function.apply(source, args);
            }
        };
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy