|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfreemarker.ext.beans.BeanModel
freemarker.ext.beans.StringModel
public class StringModel
Subclass of BeanModel
that exposes the return value of the Object.toString()
method through the TemplateScalarModel
interface.
Field Summary |
---|
Fields inherited from class freemarker.ext.beans.BeanModel |
---|
object, wrapper |
Fields inherited from interface freemarker.template.TemplateScalarModel |
---|
EMPTY_STRING |
Fields inherited from interface freemarker.template.TemplateModel |
---|
NOTHING |
Constructor Summary | |
---|---|
StringModel(java.lang.Object object,
BeansWrapper wrapper)
Creates a new model that wraps the specified object with BeanModel + scalar functionality. |
Method Summary | |
---|---|
java.lang.String |
getAsString()
Returns the result of calling Object.toString() on the wrapped
object. |
Methods inherited from class freemarker.ext.beans.BeanModel |
---|
get, getAdaptedObject, getWrappedObject, hasPlainGetMethod, invokeGenericGet, isEmpty, keys, keySet, size, toString, unwrap, values, wrap |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public StringModel(java.lang.Object object, BeansWrapper wrapper)
object
- the object to wrap into a model.wrapper
- the BeansWrapper
associated with this model.
Every model has to have an associated BeansWrapper
instance. The
model gains many attributes from its wrapper, including the caching
behavior, method exposure level, method-over-item shadowing policy etc.Method Detail |
---|
public java.lang.String getAsString()
Object.toString()
on the wrapped
object.
getAsString
in interface TemplateScalarModel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |