com.github.leeonky.dal.runtime.StaticCurryingMethod Maven / Gradle / Ivy
package com.github.leeonky.dal.runtime;
import com.github.leeonky.util.Converter;
import com.github.leeonky.util.NumberType;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.stream.Collectors;
import static com.github.leeonky.util.Suppressor.get;
class StaticCurryingMethod extends InstanceCurryingMethod {
public StaticCurryingMethod(Object instance, Method method, Converter converter) {
super(instance, method, converter);
}
@Override
protected InstanceCurryingMethod clone() {
return new StaticCurryingMethod(instance, method, converter);
}
@Override
protected int parameterOffset() {
return 1;
}
@Override
public Object resolve() {
return get(() -> method.invoke(null, parameterValues.stream().map(parameterValue -> parameterValue.getArg(converter))
.collect(Collectors.toCollection(() -> new ArrayList
© 2015 - 2025 Weber Informatics LLC | Privacy Policy