class STGroup extends AnyRef
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.
- Alphabetic
- By Inheritance
- STGroup
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new STGroup(native: stringtemplate.v4.STGroup)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
fileName: String
Get the group file name.
Get the group file name.
- returns
the file name
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
def
instanceOf(templateName: String): Try[ST]
Get an instance of a template defined in group.
Get an instance of a template defined in group.
- templateName
the name of the template
- returns
Success(ST)if the template was found and loaded.Failure(exception)if the template could not be demand-loaded.
-
def
isDefined(name: String): Boolean
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")
- name
the template name
- returns
trueif defined,falseif not
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
load(): Try[Unit]
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.
- returns
Success(Unit)on success.Failure(exception)on load failure.
-
def
name: String
Get the group's name.
Get the group's name.
- returns
the group name
-
def
nativeGroup: stringtemplate.v4.STGroup
Get the underlying Java StringTemplate
STGroupobject.Get the underlying Java StringTemplate
STGroupobject.- returns
the underlying
STGroup
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
registerRenderer[T](r: AttributeRenderer[T])(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): Unit
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
AttributeRendererunless you add the values it is to render as raw objects. See theST.add()method for details.- See also
-
def
rootDirURL: URL
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.
- returns
the root
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
templateNames: Set[String]
Get the template names defined by the group.
Get the template names defined by the group.
- returns
a set of the template names supplied by this group
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
unload(): Unit
Force an unload.
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )