org.apache.tiles.request.freemarker.autotag
Class FreemarkerUtil

Package class diagram package FreemarkerUtil
java.lang.Object
  extended by org.apache.tiles.request.freemarker.autotag.FreemarkerUtil

public final class FreemarkerUtil
extends Object

Utilities for FreeMarker usage in Tiles.

Version:
$Rev: 1360343 $ $Date: 2012-07-11 14:35:52 -0400 (Wed, 11 Jul 2012) $

Method Summary
static
<T> T
getAsObject(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(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 © 2001-2012 Apache Software Foundation. All Rights Reserved.