Class JavaFunction
- java.lang.Object
-
- org.kie.dmn.feel.runtime.functions.BaseFEELFunction
-
- org.kie.dmn.feel.runtime.functions.JavaFunction
-
- All Implemented Interfaces:
FEELFunction
@GwtIncompatible public class JavaFunction extends BaseFEELFunction
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.kie.dmn.feel.runtime.FEELFunction
FEELFunction.Param
-
-
Constructor Summary
Constructors Constructor Description JavaFunction(String name, List<FEELFunction.Param> params, Class clazz, Method method)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<List<FEELFunction.Param>>getParameters()Returns the parameter for each supported signature.FEELFnResult<Object>invoke(EvaluationContext ctx, Object[] params)this method should be overriden by custom function implementations that should be invoked reflectivelyprotected booleanisCustomFunction()StringtoString()-
Methods inherited from class org.kie.dmn.feel.runtime.functions.BaseFEELFunction
getName, getSymbol, invokeReflectively, setName
-
-
-
-
Constructor Detail
-
JavaFunction
public JavaFunction(String name, List<FEELFunction.Param> params, Class clazz, Method method)
-
-
Method Detail
-
getParameters
public List<List<FEELFunction.Param>> getParameters()
Description copied from interface:FEELFunctionReturns the parameter for each supported signature.- Specified by:
getParametersin interfaceFEELFunction- Overrides:
getParametersin classBaseFEELFunction- Returns:
- a List of Lists of Strings with the parameters. For a function with multiple signatures, each element of the list returns the parameters of one signature. E.g.: the substring function has 2 supported signatures: substring( string, start position ) substring( string, start position, length ) So this method will return: { { "string", "start position" }, { "string", "start position", "length" } }
-
invoke
public FEELFnResult<Object> invoke(EvaluationContext ctx, Object[] params)
Description copied from class:BaseFEELFunctionthis method should be overriden by custom function implementations that should be invoked reflectively- Overrides:
invokein classBaseFEELFunction- Returns:
-
isCustomFunction
protected boolean isCustomFunction()
- Overrides:
isCustomFunctionin classBaseFEELFunction
-
-