Scalasti
A Scala interface to the Java StringTemplate library
Install / Use
/learn @bmc/ScalastiREADME
Scalasti: A Scala interface to the Java StringTemplate Library
Introduction
This is Scalasti, a Scala interface to the StringTemplate Java template library.
Scalasti provides a (useful) subset of the StringTemplate API's features, with a more Scala-friendly syntax.
Scalasti's additional features include:
-
Immutability. As of version 3.0.0, Scalasti objects are immutable, unlike the StringTemplate objects. Modifier methods always create new objects; they never modify objects in place. Immutability is more functional and more idiomatic to Scala, and an immutable Scalasti API was long overdue.
-
Error-handling. Where possible, Scalasti propagates errors via
scala.util.Tryobjects, instead of via a StringTemplate listener. This approach is also more idiomatic to Scala. -
Scala object support. Scalasti supports Scala objects, meaning you don't have to use
@BeanPropertyon your Scala classes before you can pass them into a template. This feature also allows you to use instances of third-party Scala classes directly with Scalasti. -
Stronger type safety. You should never need to cast objects you receive from the Scalast API.
-
Mapped aggregates provide the ability to add maps (which can be nested) as template attributes, which you can then deference within the template via dot-notation.
For complete information, see the Scalasti home page.
Copyright and license
Scalasti is copyright © 2010-2018 Brian M. Clapper and is released under a BSD license. See the accompanying license file for details.
Related Skills
node-connect
346.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
346.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
346.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
