|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfreemarker.ext.beans2.StaticClassWrapper<T>
public class StaticClassWrapper<T>
Wrapper for static or uninstantiated classes. Provides access to static fields and methods of a given class.
| Field Summary | |
|---|---|
protected java.lang.Class<T> |
clazz
The class being wrapped by this wrapper |
| Constructor Summary | |
|---|---|
StaticClassWrapper()
Default constructor where a class is not provided initially. |
|
StaticClassWrapper(java.lang.Class<T> clazz)
Constructor that takes a class to be wrapped. |
|
| Method Summary | |
|---|---|
TemplateModel |
get(java.lang.String key)
Gets a TemplateModel from the hash. |
java.lang.String |
getAsString()
Returns the class's name as a String. |
boolean |
isEmpty()
Is the object empty? |
void |
put(java.lang.String key,
TemplateModel model)
Sets a value in the hash model. |
void |
setClazz(java.lang.Class<T> clazz)
Sets the class to be wrapped by this class wrapper. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.Class<T> clazz
| Constructor Detail |
|---|
public StaticClassWrapper()
public StaticClassWrapper(java.lang.Class<T> clazz)
clazz - the class to be wrapped| Method Detail |
|---|
public void setClazz(java.lang.Class<T> clazz)
clazz - the class to be wrapped
public boolean isEmpty()
throws TemplateModelException
isEmpty in interface TemplateModeltrue if this object is empty, otherwise false
TemplateModelException
public TemplateModel get(java.lang.String key)
throws TemplateModelException
TemplateModel from the hash.
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 key
public void put(java.lang.String key,
TemplateModel model)
throws TemplateModelException
put in interface TemplateWriteableHashModelkey - the hash keymodel - the value to be added to the hash model
TemplateModelException - there was a problem setting the value
for the given key
public java.lang.String getAsString()
throws TemplateModelException
String.
getAsString in interface TemplateScalarModelString representation of this class.
TemplateModelException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||