public class FillTemplateFunction extends AbstractTemplateFunction
| Constructor and Description |
|---|
FillTemplateFunction() |
| Modifier and Type | Method and Description |
|---|---|
Object |
execute(Template template,
TemplateContext context,
Object... parameters)
执行函数体
|
String |
getBindingTypes()
绑定到类型上,使之成为这些类型的成员函数,如果有多个可以用半角的逗号分隔
比如:此方法返回“java.lang.Integer”,表示可以在模板语言中的Integer类型的对象integer
用“integer.someFunction(...)”的方式调用此方法
为了方便扩展,这方法也可以返回多个类型,比如:“java.lang.Integer,java.lang.Long”,
就表示同时给Integer和Long类型添加此扩展方法
|
getNames, getTemplateEngine, notSupported, setTemplateEnginepublic String getBindingTypes()
TemplateFunctiongetBindingTypes in interface TemplateFunctiongetBindingTypes in class AbstractTemplateFunctionpublic Object execute(Template template, TemplateContext context, Object... parameters) throws TemplateException
TemplateFunctionTemplateExceptionCopyright © 2006–2018 TinyGroup. All rights reserved.