|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.teatrove.tea.runtime.TemplateLoader
public class TemplateLoader
TemplateLoader manages the loading and execution of Tea templates. To reload templates, create a new TemplateLoader with a new ClassLoader.
org.teatrove.tea.util.ClassInjector| Nested Class Summary | |
|---|---|
static interface |
TemplateLoader.Template
A ready-to-use Tea template. |
| Constructor Summary | |
|---|---|
TemplateLoader()
Creates a TemplateLoader that uses the current ClassLoader as a base. |
|
TemplateLoader(ClassLoader baseLoader,
String packagePrefix)
Creates a TemplateLoader that uses the given ClassLoader as a base. |
|
TemplateLoader(String packagePrefix)
Creates a TemplateLoader that uses the current ClassLoader as a base. |
|
| Method Summary | |
|---|---|
TemplateLoader.Template[] |
getLoadedTemplates()
Returns all the templates that have been loaded thus far. |
TemplateLoader.Template |
getTemplate(String name)
Get or load a template by its full name. |
protected TemplateLoader.Template |
loadTemplate(String name)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TemplateLoader()
public TemplateLoader(String packagePrefix)
packagePrefix - Package that templates should be loaded from
public TemplateLoader(ClassLoader baseLoader,
String packagePrefix)
baseLoader - Base ClassLoaderpackagePrefix - Package that templates should be loaded from| Method Detail |
|---|
public final TemplateLoader.Template getTemplate(String name)
throws ClassNotFoundException,
NoSuchMethodException,
LinkageError
ClassNotFoundException - when template not found
NoSuchMethodException - when the template is invalid
LinkageErrorpublic final TemplateLoader.Template[] getLoadedTemplates()
protected TemplateLoader.Template loadTemplate(String name)
throws ClassNotFoundException,
NoSuchMethodException,
LinkageError
ClassNotFoundException
NoSuchMethodException
LinkageError
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||