Class FormatWriterMethod

  • All Implemented Interfaces:
    freemarker.template.TemplateMethodModel, freemarker.template.TemplateMethodModelEx, freemarker.template.TemplateModel

    public final class FormatWriterMethod
    extends java.lang.Object
    implements freemarker.template.TemplateMethodModelEx
    Custom FreeMarker Template language method.

    Render object to mimetype of web script template. If object cannot be serialized to mimetype then no output is written.

    Usage: formatwrite(object) Where: object => object to write

    Author:
    davidc
    • Field Summary

      • Fields inherited from interface freemarker.template.TemplateModel

        NOTHING
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object exec​(java.util.List args)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FormatWriterMethod

        public FormatWriterMethod​(FormatRegistry formatRegistry,
                                  java.lang.String format)
        Construct
    • Method Detail

      • exec

        public java.lang.Object exec​(java.util.List args)
                              throws freemarker.template.TemplateModelException
        Specified by:
        exec in interface freemarker.template.TemplateMethodModel
        Specified by:
        exec in interface freemarker.template.TemplateMethodModelEx
        Throws:
        freemarker.template.TemplateModelException