Class CustomFunctionBuilderImpl
- java.lang.Object
-
- org.camunda.bpm.dmn.feel.impl.scala.function.builder.CustomFunctionBuilderImpl
-
- All Implemented Interfaces:
CustomFunctionBuilder
public class CustomFunctionBuilderImpl extends java.lang.Object implements CustomFunctionBuilder
-
-
Field Summary
Fields Modifier and Type Field Description protected CustomFunctioncustomFunctionprotected intfunctionCountprotected static ScalaFeelLoggerLOGGER
-
Constructor Summary
Constructors Constructor Description CustomFunctionBuilderImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CustomFunctionbuild()Returns the custom function to be registered inFeelCustomFunctionProvider.protected voidcheckHasFunction()CustomFunctionBuilderenableVarargs()Enable variable argumentsCustomFunctionBuildersetFunction(java.util.function.Function<java.util.List<java.lang.Object>,java.lang.Object> function)Pass aFunctionwith aListof objects as argument and an object as return value.CustomFunctionBuildersetParams(java.lang.String... params)Define the parameters of the custom function.CustomFunctionBuildersetReturnValue(java.lang.Object returnValue)Define a custom function that only returns a value and has no further business logic (method body).
-
-
-
Field Detail
-
LOGGER
protected static final ScalaFeelLogger LOGGER
-
customFunction
protected CustomFunction customFunction
-
functionCount
protected int functionCount
-
-
Method Detail
-
setParams
public CustomFunctionBuilder setParams(java.lang.String... params)
Description copied from interface:CustomFunctionBuilderDefine the parameters of the custom function.- Specified by:
setParamsin interfaceCustomFunctionBuilder- Parameters:
params- of the custom function- Returns:
- the builder
-
enableVarargs
public CustomFunctionBuilder enableVarargs()
Description copied from interface:CustomFunctionBuilderEnable variable arguments- Specified by:
enableVarargsin interfaceCustomFunctionBuilder- Returns:
- the builder
-
setReturnValue
public CustomFunctionBuilder setReturnValue(java.lang.Object returnValue)
Description copied from interface:CustomFunctionBuilderDefine a custom function that only returns a value and has no further business logic (method body). It is not possible to use this method together withCustomFunctionBuilder.setFunction(java.util.function.Function<java.util.List<java.lang.Object>, java.lang.Object>).- Specified by:
setReturnValuein interfaceCustomFunctionBuilder- Parameters:
returnValue- that should be returned by the custom function- Returns:
- the builder
-
setFunction
public CustomFunctionBuilder setFunction(java.util.function.Function<java.util.List<java.lang.Object>,java.lang.Object> function)
Description copied from interface:CustomFunctionBuilderPass aFunctionwith aListof objects as argument and an object as return value. It is not possible to use this method together withCustomFunctionBuilder.setReturnValue(java.lang.Object).- Specified by:
setFunctionin interfaceCustomFunctionBuilder- Parameters:
function- to be called- Returns:
- the builder
-
build
public CustomFunction build()
Description copied from interface:CustomFunctionBuilderReturns the custom function to be registered inFeelCustomFunctionProvider.- Specified by:
buildin interfaceCustomFunctionBuilder- Returns:
- a custom function
-
checkHasFunction
protected void checkHasFunction()
-
-