Package io.prestosql.sql.gen
Class VarArgsToMapAdapterGenerator
- java.lang.Object
-
- io.prestosql.sql.gen.VarArgsToMapAdapterGenerator
-
public final class VarArgsToMapAdapterGenerator extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MethodHandle
generateVarArgsToMapAdapter(Class<?> returnType, List<Class<?>> javaTypes, List<String> names, Function<Map<String,Object>,Object> function)
Generate byte code that
-
-
-
Method Detail
-
generateVarArgsToMapAdapter
public static MethodHandle generateVarArgsToMapAdapter(Class<?> returnType, List<Class<?>> javaTypes, List<String> names, Function<Map<String,Object>,Object> function)
Generate byte code that- takes a specified number of variables as arguments (types of the arguments are provided in
javaTypes
) - put the variables in a map (keys of the map are provided in
names
) - invoke the provided
function
with the map - return with the result of the function call (type must match
returnType
)
- takes a specified number of variables as arguments (types of the arguments are provided in
-
-