Get the group file name.
Get an instance of a template defined in group.
Get an instance of a template defined in group.
the name of the template
Success(ST)
if the template was found and loaded.
Failure(exception)
if the template could not be demand-loaded.
Determine whether a named template is defined in this group.
Determine whether a named template is defined in this group. The names must be fully-qualified template paths (e.g., "/g1/name")
the template name
true
if defined, false
if not
Force a load.
Force a load. Templates are normally loaded on demand; this method attempts to load them up front. Note: Even though this method attempts to detect failure, the underlying StringTemplate method seems to trap load errors and display them on standard output, without passing them up the stack. Testing for errors might not return what you expect.
Success(Unit)
on success. Failure(exception)
on load failure.
Get the group's name.
Get the underlying Java StringTemplate STGroup
object.
Get the underlying Java StringTemplate STGroup
object.
the underlying STGroup
Register a renderer for a particular type.
Register a renderer for a particular type. When the underlying StringTemplate API attempts to render a template, it'll use this renderer when it encounters values of this type.
NOTE: By default, Scalasti automatically wraps Scala objects
in dynamically generated Java Beans when they're added to templates,
because the StringTemplate API uses Java Bean semantics to access
object fields. For this reason, you cannot use an AttributeRenderer
unless you add the values it is to render as raw objects. See the
ST.add()
method for details.
Get the root directory, if this is the group directory, or the group file, if this is a group file.
Get the root directory, if this is the group directory, or the group file, if this is a group file.
the root
Get the template names defined by the group.
Get the template names defined by the group.
a set of the template names supplied by this group
Force an unload.
Force an unload.
STGroupFile
wraps the StringTemplate API'sSTGroupFile
class. AnSTGroupFile
object reads a template group from a file. See the StringTemplate API documentation for details. SinceSTGroupFile
a subclass ofSTGroup
, all the methods on the parent class are available on this one. This class cannot be instantiated directly; use theapply()
methods on the companion object.