| java.lang.Object com.go.tea.runtime.TemplateLoader
TemplateLoader | public class TemplateLoader (Code) | | TemplateLoader manages the loading and execution of Tea templates. To
reload templates, create a new TemplateLoader with a new ClassLoader.
author: Brian S O'Neill version: 15 , 9/07/00 See Also: com.go.tea.util.ClassInjector |
Inner Class :public static interface Template | |
Constructor Summary | |
public | TemplateLoader() Creates a TemplateLoader that uses the current ClassLoader as a base.
It is recommended that templates be compiled to a base package and that
a TemplateLoader be constructed with the package prefix. | public | TemplateLoader(String packagePrefix) Creates a TemplateLoader that uses the current ClassLoader as a base. | public | TemplateLoader(ClassLoader baseLoader, String packagePrefix) Creates a TemplateLoader that uses the given ClassLoader as a base. |
Method Summary | |
final public synchronized Template[] | getLoadedTemplates() Returns all the templates that have been loaded thus far. | final public synchronized Template | getTemplate(String name) Get or load a template by its full name. | protected Template | loadTemplate(String name) |
TemplateLoader | public TemplateLoader()(Code) | | Creates a TemplateLoader that uses the current ClassLoader as a base.
It is recommended that templates be compiled to a base package and that
a TemplateLoader be constructed with the package prefix. This way,
the TemplateLoader can easily distinguish between template classes and
normal classes, only loading the templates.
|
TemplateLoader | public TemplateLoader(String packagePrefix)(Code) | | Creates a TemplateLoader that uses the current ClassLoader as a base.
Parameters: packagePrefix - Package that templates should be loaded from |
TemplateLoader | public TemplateLoader(ClassLoader baseLoader, String packagePrefix)(Code) | | Creates a TemplateLoader that uses the given ClassLoader as a base. A
base ClassLoader is used to load both template and non-template classes.
The base ClassLoader can use the package prefix for determining
whether or not it is loading a template.
Parameters: baseLoader - Base ClassLoader Parameters: packagePrefix - Package that templates should be loaded from |
getLoadedTemplates | final public synchronized Template[] getLoadedTemplates()(Code) | | Returns all the templates that have been loaded thus far.
|
|
|