freemarker.template
public interface ObjectWrapper
An object that knows how to "wrap" a java object as a TemplateModel instance.
Modifier and Type | Field and Description |
---|---|
static ObjectWrapper |
BEANS_WRAPPER
An ObjectWrapper that works similarly to
SIMPLE_WRAPPER , but
exposes the objects methods and JavaBeans properties as hash elements
and custom handling for Java Maps, ResourceBundles, etc. |
static ObjectWrapper |
DEFAULT_WRAPPER
The default object wrapper implementation.
|
static ObjectWrapper |
SIMPLE_WRAPPER
Object wrapper that uses SimpleXXX wrappers only.
|
Modifier and Type | Method and Description |
---|---|
TemplateModel |
wrap(Object obj) |
static final ObjectWrapper BEANS_WRAPPER
SIMPLE_WRAPPER
, but
exposes the objects methods and JavaBeans properties as hash elements
and custom handling for Java Maps, ResourceBundles, etc.static final ObjectWrapper DEFAULT_WRAPPER
static final ObjectWrapper SIMPLE_WRAPPER
TemplateModel wrap(Object obj) throws TemplateModelException
TemplateModelException