|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfreemarker.ext.beans.StaticModel
freemarker.ext.beans2 package
public final class StaticModel
Wraps the static fields and methods of a class in a TemplateHashModel.
Fields are wrapped using BeansWrapper.wrap(Object), and
methods are wrapped into MethodModel instances.
Unfortunately, there is currently no support for bean property-style
calls of static methods, as in ObjectModel.
| Method Summary | |
|---|---|
static StaticModel |
create(java.lang.Class clazz)
Deprecated. Creates a model representing the static fields and methods of the passed class. |
TemplateModel |
get(java.lang.String key)
Deprecated. Returns the field or method named by the key
parameter. |
boolean |
isEmpty()
Deprecated. Returns true if there is at least one public static field or method in the underlying class. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static final StaticModel create(java.lang.Class clazz)
public TemplateModel get(java.lang.String key)
throws TemplateModelException
key
parameter.
get in interface TemplateHashModelkey - the name by which the TemplateModel
is identified in the template.
TemplateModel referred to by the key,
or null if not found.
TemplateModelException - there was a problem getting the value
for the given keypublic boolean isEmpty()
isEmpty in interface TemplateModeltrue if this object is empty, otherwise false
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||