Class TemplateContext
java.lang.Object
cloud.opencode.base.string.template.TemplateContext
Template Context - Holds variables and state for template rendering.
模板上下文 - 持有模板渲染的变量和状态。
Features | 主要功能:
- Variable storage for template rendering - 模板渲染变量存储
- Built-in filters (upper, lower, truncate, default) - 内置过滤器
- Custom filter registration - 自定义过滤器注册
Usage Examples | 使用示例:
TemplateContext ctx = new TemplateContext(Map.of("name", "World"));
Object value = ctx.get("name"); // "World"
Security | 安全性:
- Thread-safe: No (mutable state) - 线程安全: 否(可变状态)
- Since:
- JDK 25, opencode-base-string V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
TemplateContext
public TemplateContext() -
TemplateContext
-
-
Method Details
-
get
-
set
-
getFilter
-
registerFilter
-
getVariables
-