|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfreemarker.ext.beans2.ResourceBundleWrapper
public class ResourceBundleWrapper
Wrapper for ResourceBundle objects. Provides a simple hash model for accessing objects within a given bundle.
| Constructor Summary | |
|---|---|
ResourceBundleWrapper()
Default constructor where an object is not provided initially. |
|
ResourceBundleWrapper(java.util.ResourceBundle object)
Constructor that takes a ResourceBundle object to be wrapped. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Creates and returns a copy of this object. |
TemplateModel |
get(java.lang.String key)
Gets a value from the resource bundle. |
java.lang.Object |
getAsObject()
Return the underlying object to the reflection mechanism in the freemarker.ext.beans package. |
boolean |
isEmpty()
Is the resource bundle empty or null? |
void |
setObject(java.lang.Object object)
Sets the object to be wrapped by this object wrapper. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResourceBundleWrapper()
public ResourceBundleWrapper(java.util.ResourceBundle object)
object - the resource bundle object to be wrapped| Method Detail |
|---|
public void setObject(java.lang.Object object)
ObjectWrapper
setObject in interface ObjectWrapperobject - the object to be wrapped
public java.lang.Object getAsObject()
throws TemplateModelException
freemarker.ext.beans package. Any variables, methods
or properties can be called directly via reflection.
getAsObject in interface TemplateObjectModelTemplateModelException - the object could not be returned
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
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 java.lang.Object clone()
clone in interface ObjectWrapperclone in class java.lang.Objectjava.lang.RuntimeException - the clone operation was not successful
java.lang.OutOfMemoryError - if there is not enough memory.Cloneable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||