public class STGroupDir extends STGroup
| Modifier and Type | Field and Description |
|---|---|
String |
groupDirName
|
URL |
root
|
adaptors, DEFAULT_ERR_MGR, DEFAULT_KEY, defaultGroup, delimiterStartChar, delimiterStopChar, DICT_KEY, dictionaries, encoding, errMgr, GROUP_FILE_EXTENSION, imports, importsToClearOnUnload, iterateAcrossValues, NOT_FOUND_ST, renderers, TEMPLATE_FILE_EXTENSION, templates, trackCreationEvents, verbose| Constructor and Description |
|---|
STGroupDir(String
|
STGroupDir(String
|
STGroupDir(String
|
STGroupDir(String
|
STGroupDir(URL
|
| Modifier and Type | Method and Description |
|---|---|
String |
getFileName()
|
String |
getName()
|
URL |
getRootDirURL()
Return root dir if this is group dir; return dir containing group file if this is group file.
|
void |
importTemplates(org
Import template files, directories, and group files.
|
protected CompiledST |
load(String
Load a template from directory or group file.
|
CompiledST |
loadTemplateFile(String
Load .st as relative file name relative to root by
prefix.
|
compile, createSingleton, createStringTemplate, createStringTemplateInternally, createStringTemplateInternally, defineDictionary, defineRegion, defineTemplate, defineTemplate, defineTemplate, defineTemplateAlias, defineTemplateOrRegion, getAttributeRenderer, getEmbeddedInstanceOf, getImportedGroups, getInstanceOf, getListener, getMangledRegionName, getModelAdaptor, getTemplateNames, getUnMangledTemplateName, getURL, importTemplates, importTemplates, isDefined, isDictionary, load, loadAbsoluteTemplateFile, loadGroupFile, loadTemplateFile, lookupImportedTemplate, lookupTemplate, rawDefineTemplate, rawGetDictionary, rawGetTemplate, registerModelAdaptor, registerRenderer, registerRenderer, setListener, show, toString, undefineTemplate, unloadpublic STGroupDir(StringdirName)
public STGroupDir(StringdirName, char delimiterStartChar, char delimiterStopChar)
public STGroupDir(StringdirName, String encoding, char delimiterStartChar, char delimiterStopChar)
public void importTemplates(org.antlr .runtime .Token fileNameToken)
STGroup
t() then we search for
t() in the subgroup first.
Templates are loaded on-demand from import dirs. Imported groups are loaded on-demand when searching for a template.
The listener of this group is passed to the import group so errors found while loading imported element are sent to listener of this group.
On unload imported templates are unloaded and removed from the imports list.
This method is called when processing import statements specified in group files. Use STGroup to import templates 'programmatically'.
protected CompiledSTload(String name)
name is always fully-qualified.
public CompiledSTloadTemplateFile(String prefix, String unqualifiedFileName)
prefix.
public StringgetName()
public StringgetFileName()
public URLgetRootDirURL()
STGroup