DocumentTypeFunctionCallValidator

Validator of a function call that checks if the document the function call lies in is of a certain type. If not, an InvalidFunctionCallException is thrown.

Parameters

allowedTypes

allowed document types

Type Parameters

T

output type of the function

Constructors

Link copied to clipboard
constructor(allowedTypes: Iterable<DocumentType>)

Functions

Link copied to clipboard
open override fun validate(call: FunctionCall<T>)

Validates a function call. If a condition is not met, an exception should be thrown (ideally, a FunctionException or subclass). Validation should not have any side effects.