freemarker.ext.beans
Class StaticModels

java.lang.Object
  extended by freemarker.ext.beans.StaticModels
All Implemented Interfaces:
TemplateHashModel, TemplateModel, java.io.Serializable

Deprecated. this class is deprecated in favour of the classes in the freemarker.ext.beans2 package

public final class StaticModels
extends java.lang.Object
implements TemplateHashModel, java.io.Serializable

Utility class for instantiating StaticModel instances from templates. If your template's data model contains an instance of StaticModels (named, say StaticModels), then you can instantiate an arbitrary StaticModel using get syntax (i.e. StaticModels["java.lang.System"]).

Version:
$Id: StaticModels.java 1101 2013-04-01 04:17:32Z run2000 $
Author:
Attila Szegedi, attila@szegedi.org
See Also:
Serialized Form

Field Summary
static StaticModels INSTANCE
          Deprecated. The single instance of the class.
 
Method Summary
 TemplateModel get(java.lang.String key)
          Deprecated. Returns a StaticModel for the fully qualified class name passed as the key.
static StaticModels getInstance()
          Deprecated. Return a singleton instance of this class.
 boolean isEmpty()
          Deprecated. Is the object empty?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final StaticModels INSTANCE
Deprecated. 
The single instance of the class.

Method Detail

getInstance

public static StaticModels getInstance()
Deprecated. 
Return a singleton instance of this class.

Returns:
the singleton instance of this class

get

public TemplateModel get(java.lang.String key)
                  throws TemplateModelException
Deprecated. 
Returns a StaticModel for the fully qualified class name passed as the key.

Specified by:
get in interface TemplateHashModel
Parameters:
key - the name by which the TemplateModel is identified in the template.
Returns:
the TemplateModel referred to by the key, or null if not found.
Throws:
TemplateModelException - there was a problem getting the value for the given key

isEmpty

public boolean isEmpty()
Deprecated. 
Description copied from interface: TemplateModel
Is the object empty?

Specified by:
isEmpty in interface TemplateModel
Returns:
true if this object is empty, otherwise false