class ImmutableFunctionExpression implements FunctionExpression {

    @Override
    public PipelineElement resolve(final String expression, final PipelineElement resolvedInputValue,
            final ExpressionResolver expressionResolver) {

        if (!supports(expression.replaceFirst(getPrefix() + ":", ""))) {
            throw PlaceholderFunctionUnknownException.newBuilder(expression).build();
        }

        return SUPPORTED.stream()
                .filter(pf -> expression.startsWith(getPrefix() + ":" + pf.getName() + "("))
                .map(pf -> pf.apply(resolvedInputValue,
                        expression.replaceFirst(getPrefix() + ":" + pf.getName(), "").trim(),
                        expressionResolver)
                )
                .findFirst()
                .orElse(PipelineElement.unresolved());
    }

}