Wraps the object with a template model that is most specific for the object's
class. Specifically:
- if the object is null, returns the
null model,
- if the object is a Number returns a
NumberModel for it,
- if the object is a Date returns a
DateModel for it,
- if the object is a Boolean returns
TemplateBooleanModel.TRUE or
TemplateBooleanModel.FALSE
- if the object is already a TemplateModel, returns it unchanged,
- if the object is an array, returns a
ArrayModel for it
- if the object is a Map, returns a
MapModel for it
- if the object is a Collection, returns a
CollectionModel for it
- if the object is an Iterator, returns a
IteratorModel for it
- if the object is an Enumeration, returns a
EnumerationModel for it
- if the object is a String, returns a
StringModel for it
- otherwise, returns a generic
BeanModel for it.