A more Scala-like ST attribute renderer.
A Scalasti version of String Template's DateRenderer
.
A Scalasti version of String Template's NumberRenderer
.
A Scala interface to a StringTemplate ST
template.
A Scala interface to a StringTemplate ST
template. objet Note that this
interface does not directly expose all the underlying ST methods. In
particular, this Scala interface is geared primarily toward reading and
rendering external templates, not toward generating templates in code.
This class cannot be instantiated directly. Instead, use the apply()
methods in the companion object.
Because of the way the ST API instantiates templates, this class cannot
easily subclass the real ST class. So, it wraps the underlying string
template object and stores it internally. You can retrieve the wrapped
template object via the nativeST
method. You are free to call methods
directly on template
, though they will use Java semantics, rather than
Scala semantics.
Note that this class explicitly handles mapping the following types of values in an attribute map:
Seq
(which includes lists and array buffers) is mapped to
a java.util.List
, so it's treated as a multivalued attribute by the
underlying ST library.java.util.List
.Regular objects are, by default, wrapped in a Java Bean, because the
underlying String Template API uses Java Bean semantics to access object
fields. Thus, if a template references "foo.bar", StringTemplate will expect
that the object associated with the name "foo" has a method called
getBar()
. To allow Scala objects (and, especially, case class objects)
to be used directly, Scalasti automatically generates wrapper Java Beans
for them.
There are cases where you don't want this behavior, however. For instance,
it doesn't make much sense with numeric values or strings, so Scalasti
deliberately does not wrap those objects. There are other cases where
you might not want the automatic Bean-wrapper behavior; see the
add
method for more details.
A Scala version of the String Template library's
StringTemplateErrorListener
class.
A Scala wrapper for the String Template library's STGroup
class.
A Scala wrapper for the String Template library's STGroup
class. This
class provides access to most of the methods on the underlying class,
with Scala semantics, where appropriate. This class cannot be instantiated
directly; use the apply()
methods on the companion object, or create one
of the subclasses.
This class does not expose all of the underlying functions of the actual
StringTemplate API. If you need access to the full Java StringTemplate API,
you can retrieve the underlying STGroup
by calling the nativeGroup
method.
STGroupDir
wraps the StringTemplate API's STGroupDir
class.
STGroupDir
wraps the StringTemplate API's STGroupDir
class. An
STGroupDir
specifies a directory or directory tree full of templates
and/or group files, with the files loaded on demand. As a subclass of
STGroup
, an STGroupDir
contains all the methods of the parent class.
This class cannot be instantiated directly; use the apply()
methods on
the companion object.
STGroupFile
wraps the StringTemplate API's STGroupFile
class.
STGroupFile
wraps the StringTemplate API's STGroupFile
class.
An STGroupFile
object reads a template group from a file. See the
StringTemplate API documentation for details. Since STGroupFile
a
subclass of STGroup
, all the methods on the parent class are available
on this one. This class cannot be instantiated directly; use the apply()
methods on the companion object.
STGroupString
wraps the StringTemplate API's STGroupString
class.
STGroupString
wraps the StringTemplate API's STGroupString
class.
An STGroupString
object reads a template group from a string. See the
StringTemplate API documentation for details. Since STGroupString
a
subclass of STGroup
, all the methods on the parent class are available
on this one. This class cannot be instantiated directly; use the apply()
methods on the companion object.
Miscellaneous shared constants.
Companion object for the ST
class.
Companion object for the ST
class. This object provides apply()
methods for instantiating ST
objects.
Companion object for the STGroup
class.
Companion object for the STGroup
class. This object provides apply()
methods for instantiating STGroup
objects.
Companion object for STGroupDir
.
Companion object for STGroupDir
. This object provides apply()
methods
for instantiating STGroupDir
objects.
Companion object for STGroupFile
.
Companion object for STGroupFile
. This object provides apply()
methods for instantiating STGroupFile
objects.
Companion object for STGroupString
.
Companion object for STGroupString
. This object provides apply()
methods for instantiating STGroupString
objects.
A more Scala-like ST attribute renderer. Objects that implement this trait can be registered as attribute renderers with an STGroupString.
the type (class) for which the renderer can render values.