|
||||||||||
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.DateModel
public class DateModel
Wraps arbitrary subclass of Date
into a reflective model.
Beside acting as a TemplateDateModel
, you can call all Java methods
on these objects as well.
Field Summary |
---|
Fields inherited from class freemarker.ext.beans.BeanModel |
---|
object, wrapper |
Fields inherited from interface freemarker.template.TemplateDateModel |
---|
DATE, DATETIME, TIME, TYPE_NAMES, UNKNOWN |
Fields inherited from interface freemarker.template.TemplateModel |
---|
NOTHING |
Constructor Summary | |
---|---|
DateModel(java.util.Date date,
BeansWrapper wrapper)
Creates a new model that wraps the specified date object. |
Method Summary | |
---|---|
java.util.Date |
getAsDate()
Returns the date value. |
int |
getDateType()
Returns the type of the date. |
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 DateModel(java.util.Date date, BeansWrapper wrapper)
date
- the date 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.util.Date getAsDate()
TemplateDateModel
getAsDate
in interface TemplateDateModel
Date
instance associated with this date model.public int getDateType()
TemplateDateModel
getDateType
in interface TemplateDateModel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |