public abstract class AbstractTemplateFunction extends Object implements TemplateFunction
| Constructor and Description |
|---|
AbstractTemplateFunction(String names) |
| Modifier and Type | Method and Description |
|---|---|
String |
getBindingTypes()
绑定到类型上,使之成为这些类型的成员函数,如果有多个可以用半角的逗号分隔
比如:此方法返回“java.lang.Integer”,表示可以在模板语言中的Integer类型的对象integer
用“integer.someFunction(...)”的方式调用此方法
为了方便扩展,这方法也可以返回多个类型,比如:“java.lang.Integer,java.lang.Long”,
就表示同时给Integer和Long类型添加此扩展方法
|
String |
getNames()
返回函数名,如果有多个名字,则用逗号分隔
|
TemplateEngine |
getTemplateEngine()
返回模板引擎
|
protected TemplateException |
notSupported(Object[] parameters) |
void |
setTemplateEngine(TemplateEngine templateEngine)
设置模板引擎
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecutepublic AbstractTemplateFunction(String names)
public TemplateEngine getTemplateEngine()
TemplateFunctiongetTemplateEngine in interface TemplateFunctionpublic void setTemplateEngine(TemplateEngine templateEngine)
TemplateFunctionsetTemplateEngine in interface TemplateFunctionpublic String getNames()
TemplateFunctiongetNames in interface TemplateFunctionpublic String getBindingTypes()
TemplateFunctiongetBindingTypes in interface TemplateFunctionprotected TemplateException notSupported(Object[] parameters) throws TemplateException
TemplateExceptionCopyright © 2006–2018 TinyGroup. All rights reserved.