public class STGroupFile extends STGroup
Modifier and Type | Field and Description |
---|---|
protected boolean |
alreadyLoaded |
String |
fileName |
URL |
url |
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 |
---|
STGroupFile(String fileName)
Load a file relative to current directory or from root or via CLASSPATH.
|
STGroupFile(String fileName,
char delimiterStartChar,
char delimiterStopChar) |
STGroupFile(String fullyQualifiedFileName,
String encoding) |
STGroupFile(String fullyQualifiedFileName,
String encoding,
char delimiterStartChar,
char delimiterStopChar) |
STGroupFile(URL url,
String encoding,
char delimiterStartChar,
char delimiterStopChar) |
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.
|
boolean |
isDefined(String name)
Is this template defined in this group or from this group below?
Names must be absolute, fully-qualified names like
/a/b . |
boolean |
isDictionary(String name) |
void |
load()
Force a load if it makes sense for the group.
|
protected CompiledST |
load(String name)
Load st from disk if directory or load whole group file if .stg file (then
return just one template).
|
String |
show() |
void |
unload()
Unload all templates, dictionaries and import relationships, but leave
renderers and adaptors.
|
compile, createSingleton, createStringTemplate, createStringTemplateInternally, createStringTemplateInternally, defineDictionary, defineRegion, defineTemplate, defineTemplate, defineTemplate, defineTemplateAlias, defineTemplateOrRegion, getAttributeRenderer, getEmbeddedInstanceOf, getImportedGroups, getInstanceOf, getListener, getMangledRegionName, getModelAdaptor, getTemplateNames, getUnMangledTemplateName, getURL, importTemplates, importTemplates, importTemplates, loadAbsoluteTemplateFile, loadGroupFile, loadTemplateFile, lookupImportedTemplate, lookupTemplate, rawDefineTemplate, rawGetDictionary, rawGetTemplate, registerModelAdaptor, registerRenderer, registerRenderer, setListener, toString, undefineTemplate
public String fileName
public URL url
protected boolean alreadyLoaded
public STGroupFile(String fileName)
public STGroupFile(String fileName, char delimiterStartChar, char delimiterStopChar)
public STGroupFile(String fullyQualifiedFileName, String encoding, char delimiterStartChar, char delimiterStopChar)
public boolean isDictionary(String name)
isDictionary
in class STGroup
public boolean isDefined(String name)
STGroup
/a/b
.public void unload()
STGroup
STGroup.getInstanceOf(java.lang.String)
to reload templates. Call unload()
on each
group in the STGroup.imports
list, and remove all elements in
STGroup.importsToClearOnUnload
from STGroup.imports
.protected CompiledST load(String name)
STGroup
name
is fully-qualified.public void load()
STGroup
public String getFileName()
getFileName
in class STGroup
public URL getRootDirURL()
STGroup
getRootDirURL
in class STGroup
Copyright © 2024. All rights reserved.