Class BeanModel

java.lang.Object
freemarker.ext.beans.BeanModel
All Implemented Interfaces:
WrapperTemplateModel, AdapterTemplateModel, TemplateHashModel, TemplateHashModelEx, TemplateModel, TemplateModelWithAPISupport
Direct Known Subclasses:
ArrayModel, BooleanModel, DateModel, EnumerationModel, IteratorModel, NumberModel, ResourceBundleModel, StringModel

A class that will wrap an arbitrary object into TemplateHashModel interface allowing calls to arbitrary property getters and invocation of accessible methods on the object from a template using the object.foo to access properties and object.bar(arg1, arg2) to invoke methods on it. You can also use the object.foo[index] syntax to access indexed properties. It uses Beans Introspector to dynamically discover the properties and methods.