public class FreemarkerObjectWrapper extends freemarker.template.DefaultObjectWrapper
This class allows Joda-Beans to be used in the Freemarker templating system.
When creating a Freemarker Configuration
, simply set call
setObjectWrapper(ObjectWrapper)
with an instance of this class.
Constructor and Description |
---|
FreemarkerObjectWrapper()
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
String |
toString() |
freemarker.template.TemplateModel |
wrap(Object obj)
Overrides to trap instances of
Bean and handle them. |
convertArray, handleUnknownType, wrapDomNode
coerceBigDecimal, coerceBigDecimals, coerceBigDecimals, getDefaultDateType, getDefaultInstance, getEnumModels, getInstance, getModelFactory, getOuterIdentity, getStaticModels, isExposeFields, isSimpleMapWrapper, isStrict, newInstance, setDefaultDateType, setExposeFields, setExposureLevel, setMethodsShadowItems, setNullModel, setOuterIdentity, setSimpleMapWrapper, setStrict, setUseCache, unwrap, unwrap
public FreemarkerObjectWrapper()
public freemarker.template.TemplateModel wrap(Object obj) throws freemarker.template.TemplateModelException
Bean
and handle them.wrap
in interface freemarker.template.ObjectWrapper
wrap
in class freemarker.template.DefaultObjectWrapper
obj
- the object to wrap, not nullfreemarker.template.TemplateModelException
- if unable to create the modelCopyright © 2007–2013 Joda.org. All rights reserved.