org.apache.tiles.request.freemarker.autotag

## Class FreemarkerAutotagRuntime

- java.lang.Object
- - org.apache.tiles.request.freemarker.autotag.FreemarkerAutotagRuntime

- All Implemented Interfaces:
    freemarker.template.TemplateDirectiveModel, freemarker.template.TemplateModel, AutotagRuntime<Request>

      public class FreemarkerAutotagRuntime
      extends Object
      implements AutotagRuntime<Request>, freemarker.template.TemplateDirectiveModel

  A Runtime for implementing a Freemarker Template Directive.

- - ### Field Summary

    - ### Fields inherited from interface freemarker.template.TemplateModel

      `NOTHING`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FreemarkerAutotagRuntime()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ModelBody` | `createModelBody()` Creates a new ModelBody instance to match the request.
    `Request` | `createRequest()` Creates a new Request instance.
    `void` | `execute(freemarker.core.Environment env, Map params, freemarker.template.TemplateModel[] loopVars, freemarker.template.TemplateDirectiveBody body)`
    `<T> T` | `getParameter(String name, Class<T> type, T defaultValue)` Extracts a parameter from the tag.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FreemarkerAutotagRuntime

          public FreemarkerAutotagRuntime()

  - ### Method Detail

    - #### execute

          public void execute(freemarker.core.Environment env,
                              Map params,
                              freemarker.template.TemplateModel[] loopVars,
                              freemarker.template.TemplateDirectiveBody body)

      Specified by:
        `execute` in interface `freemarker.template.TemplateDirectiveModel`

    - #### createRequest

          public Request createRequest()

      Creates a new Request instance.
      Specified by:
        `createRequest` in interface `AutotagRuntime<Request>`
      Returns:
        The Request.

    - #### createModelBody

          public ModelBody createModelBody()

      Creates a new ModelBody instance to match the request.
      Specified by:
        `createModelBody` in interface `AutotagRuntime<Request>`
      Returns:
        The ModelBody.

    - #### getParameter

          public <T> T getParameter(String name,
                                    Class<T> type,
                                    T defaultValue)

      Extracts a parameter from the tag.
      Specified by:
        `getParameter` in interface `AutotagRuntime<Request>`
      Parameters:
        `name` - The name of the parameter.
        `defaultValue` - The default value if none is specified.
      Returns:
        The value of the parameter.

Copyright © 2000–2026 Apache Software Foundation. All rights reserved.