public interface Function
group.registerFunction("str.upcase", new Function() {
public String call(Object[] paras, Context ctx) {
String str = (String) paras[0];
return str.toUpperCase();
}
});
str.upcase接收一个字符串参数,并将其转为大写,如下调用
hello,this is ${str.upcase(user.name)}
| 限定符和类型 | 方法和说明 |
|---|---|
Object |
call(Object[] paras,
Context ctx) |
Copyright © 2018. All rights reserved.