Save This Page
Home » freemarker-2.3.13 » freemarker.ext.beans » [javadoc | source]
freemarker.ext.beans
final class: StaticModel [javadoc | source]
java.lang.Object
   freemarker.ext.beans.StaticModel

All Implemented Interfaces:
    TemplateHashModelEx

Wraps the static fields and methods of a class in a freemarker.template.TemplateHashModel . Fields are wrapped using BeansWrapper#wrap(Object) , and methods are wrapped into an appropriate freemarker.template.TemplateMethodModelEx instance. Unfortunately, there is currently no support for bean property-style calls of static methods, similar to that in BeanModel .
Constructor:
 StaticModel(Class clazz,
    BeansWrapper wrapper) throws TemplateModelException 
Method from freemarker.ext.beans.StaticModel Summary:
get,   isEmpty,   keys,   size,   values
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from freemarker.ext.beans.StaticModel Detail:
 public TemplateModel get(String key) throws TemplateModelException 
    Returns the field or method named by the key parameter.
 public boolean isEmpty() 
    Returns true if there is at least one public static field or method in the underlying class.
 public TemplateCollectionModel keys() throws TemplateModelException 
 public int size() 
 public TemplateCollectionModel values() throws TemplateModelException