Class FunctionEvaluator
java.lang.Object
io.github.erdos.stencil.functions.FunctionEvaluator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCalls a function by name.Returns a thread-safe sequence of all registered functions.void
registerFunctions
(Function... functions) Registers a function to this evaluator engine.
-
Constructor Details
-
FunctionEvaluator
public FunctionEvaluator()
-
-
Method Details
-
registerFunctions
Registers a function to this evaluator engine. Registered functions can be invoked from inside template files.- Parameters:
functions
- list of functions to register
-
call
Calls a function by name.- Parameters:
functionName
- Case Insensitive name of fn to call.arguments
- arguments dispatched to called function- Returns:
- result of function call
- Throws:
IllegalArgumentException
- when function name is null or missing
-
listFunctions
Returns a thread-safe sequence of all registered functions.
-