@Override
    Object writeObject(Map<String, Object> functions, Map<String, Object> model, TemplateMessages messages) throws TemplateException {
        String o = (String) functionIdentifier.writeObject(functions, model, messages);

        Object fp = functions.get(o);

        if (fp == null && functionIdentifier.isRequired()) {
            throw new TemplateException("No transform function named '%s' is associated with the template for rendering '\u2026:%s' at position '%s'.", o, functionIdentifier.getIdentifier(), functionIdentifier.cursor.getPosition());
        } else if (fp == null && functionIdentifier.getIdentifier().endsWith("?")) {
            throw new TemplateIgnoreRenderingException("Ignore rendering because key '%s' is not present or has null value in the model map at position '%s'.", o, functionIdentifier.cursor.getPosition());
        }

        Object arg = ((input instanceof Element)
                ? ((Element) input).writeObject(functions, model, messages)
                : input);

        if (arg == null) {
            return null;
        }

        List<Object> initParametersProcessed = super.create_parameters_after_process(initParameters, functions, model, messages);
        if (initParametersProcessed == null) {
            return null;
        }

        if (fp instanceof Transform) {
            Method method = getApplyMethod((Transform) fp);

            List<Object> wrap = new ArrayList<Object>();
            wrap.add(asArray(initParametersProcessed, null));

            Object zz = callMethod(method, o, fp, wrap);

            method = getApplyMethod((Transform) zz);
            return super.callMethod(method, o, zz, arg);
        } else if (fp instanceof Method) {
            Method method = ((Method) fp);

            return callMethod(method, o, arg, initParametersProcessed);
        } else {
            throw new TemplateException("Invalid transform function type '%s'.", fp.getClass().getCanonicalName());
        }

    }