org.apache.tiles.request.freemarker.autotag

## Class FreemarkerUtil

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

-     public final class FreemarkerUtil
      extends Object

  Utilities for FreeMarker usage in Tiles.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> T` | `getAsObject(freemarker.template.TemplateModel model, Class<T> type, T defaultValue)` Unwraps a TemplateModel to extract an object.

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

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

- - ### Method Detail

    - #### getAsObject

          public static <T> T getAsObject(freemarker.template.TemplateModel model,
                                          Class<T> type,
                                          T defaultValue)

      Unwraps a TemplateModel to extract an object.
      Parameters:
        `model` - The TemplateModel to unwrap.
        `defaultValue` - The default value, as specified in the template model, or null if not specified.
      Returns:
        The unwrapped object.

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