io.cloudevents.sql.impl.functions.BaseThreeArgumentFunction Maven / Gradle / Ivy
package io.cloudevents.sql.impl.functions;
import io.cloudevents.CloudEvent;
import io.cloudevents.sql.EvaluationContext;
import io.cloudevents.sql.EvaluationRuntime;
import io.cloudevents.sql.Type;
import java.util.List;
public abstract class BaseThreeArgumentFunction extends BaseFunction {
private final Type firstArg;
private final Type secondArg;
private final Type thirdArg;
public BaseThreeArgumentFunction(String name, Class firstArg, Class secondArg, Class thirdArg) {
super(name);
this.firstArg = Type.fromClass(firstArg);
this.secondArg = Type.fromClass(secondArg);
this.thirdArg = Type.fromClass(thirdArg);
}
abstract Object invoke(EvaluationContext ctx, EvaluationRuntime evaluationRuntime, CloudEvent event, X x, Y y, Z z);
@SuppressWarnings("unchecked")
@Override
public Object invoke(EvaluationContext ctx, EvaluationRuntime evaluationRuntime, CloudEvent event, List