|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--freemarker.ext.beans.BeansWrapper
Utility class that provides generic services to reflection classes.
It handles all polymorphism issues in the wrap(Object)
and unwrap(Object)
methods.
Method Summary | |
static java.lang.Object |
unwrap(java.lang.Object model)
Attempts to unwrap a model into underlying object. |
static TemplateModel |
wrap(java.lang.Object object)
Wraps the object with a template model that is most specific for the object's class. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static final TemplateModel wrap(java.lang.Object object)
Models.EMPTY_SCALAR
,BeanModelBase
for it,NumberModel
for it,BooleanScalar
for it,ArrayModel
for it
MapModel
for it
CollectionModel
for it
IteratorModel
for it
EnumerationModel
for it
BeanModel
for it.
public static final java.lang.Object unwrap(java.lang.Object model) throws TemplateModelException
BeanModelBase
instances, as well as generic
TemplateNumberModel
and TemplateScalarModel
instances.
All other objects are returned unchanged.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |