public class CustomFunctionBuilderImpl extends Object implements CustomFunctionBuilder
Modifier and Type | Field and Description |
---|---|
protected CustomFunction |
customFunction |
protected int |
functionCount |
protected static ScalaFeelLogger |
LOGGER |
Constructor and Description |
---|
CustomFunctionBuilderImpl() |
Modifier and Type | Method and Description |
---|---|
CustomFunction |
build()
Returns the custom function to be registered in
FeelCustomFunctionProvider . |
protected void |
checkHasFunction() |
CustomFunctionBuilder |
enableVarargs()
Enable variable arguments
|
CustomFunctionBuilder |
setFunction(java.util.function.Function<List<Object>,Object> function)
|
CustomFunctionBuilder |
setParams(String... params)
Define the parameters of the custom function.
|
CustomFunctionBuilder |
setReturnValue(Object returnValue)
Define a custom function that only returns a value and
has no further business logic (method body).
|
protected static final ScalaFeelLogger LOGGER
protected CustomFunction customFunction
protected int functionCount
public CustomFunctionBuilder setParams(String... params)
CustomFunctionBuilder
setParams
in interface CustomFunctionBuilder
params
- of the custom functionpublic CustomFunctionBuilder enableVarargs()
CustomFunctionBuilder
enableVarargs
in interface CustomFunctionBuilder
public CustomFunctionBuilder setReturnValue(Object returnValue)
CustomFunctionBuilder
CustomFunctionBuilder.setFunction(java.util.function.Function<java.util.List<java.lang.Object>, java.lang.Object>)
.setReturnValue
in interface CustomFunctionBuilder
returnValue
- that should be returned by the custom functionpublic CustomFunctionBuilder setFunction(java.util.function.Function<List<Object>,Object> function)
CustomFunctionBuilder
Function
with a List
of objects as argument
and an object as return value.
It is not possible to use this method together with
CustomFunctionBuilder.setReturnValue(java.lang.Object)
.setFunction
in interface CustomFunctionBuilder
function
- to be calledpublic CustomFunction build()
CustomFunctionBuilder
FeelCustomFunctionProvider
.build
in interface CustomFunctionBuilder
protected void checkHasFunction()
Copyright © 2022. All rights reserved.