FunctionCallNodeExpander

class FunctionCallNodeExpander(context: MutableContext, errorHandler: PipelineErrorHandler, outputMapperFactory: OutputValueVisitorFactory<Node> = NodeOutputValueVisitorFactory(context))

Given a FunctionCallNode from the AST, this expander resolves its referenced function, executes it and maps its result to a visible output in the final document.

Parameters

context

root context to dequeue to-be-expanded function calls from

errorHandler

strategy to handle errors that may occur during the execution of a function call

outputMapperFactory

producer of an AST output Node from the function call output

Constructors

Link copied to clipboard
constructor(context: MutableContext, errorHandler: PipelineErrorHandler, outputMapperFactory: OutputValueVisitorFactory<Node> = NodeOutputValueVisitorFactory(context))

Functions

Link copied to clipboard
fun expandAll()

Expands all unexpanded function calls present in context, and empties queued function calls in context. This is performed on a copy of the context's execution queue to avoid ConcurrentModificationException. Hence, if a function call is added during the expansion, expandAll must be called again.