本文整理汇总了Java中freemarker.template.TemplateMethodModel类的典型用法代码示例。如果您正苦于以下问题:Java TemplateMethodModel类的具体用法?Java TemplateMethodModel怎么用?Java TemplateMethodModel使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TemplateMethodModel类属于freemarker.template包,在下文中一共展示了TemplateMethodModel类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setMessageBundle
import freemarker.template.TemplateMethodModel; //导入依赖的package包/类
public void setMessageBundle(TemplateMethodModel resourceBundleModel) {
this.messageBundleModel = resourceBundleModel;
}
示例2: setSourceLinker
import freemarker.template.TemplateMethodModel; //导入依赖的package包/类
public void setSourceLinker(TemplateMethodModel sourceLinker) {
this.sourceLinker = sourceLinker;
}
示例3: getMessage
import freemarker.template.TemplateMethodModel; //导入依赖的package包/类
public TemplateMethodModel getMessage() {
return messageBundleModel;
}
示例4: getSourceLink
import freemarker.template.TemplateMethodModel; //导入依赖的package包/类
public TemplateMethodModel getSourceLink() {
return sourceLinker;
}
示例5: executeUriMethod
import freemarker.template.TemplateMethodModel; //导入依赖的package包/类
private Object executeUriMethod(String contextPath, String relativePath) throws TemplateModelException {
TemplateMethodModel uriMethod = new UriMethod(contextPath);
return uriMethod.exec(asList(relativePath));
}
示例6: test_throw_exception_when_no_arguments_are_provided
import freemarker.template.TemplateMethodModel; //导入依赖的package包/类
@Test(expected = TemplateModelException.class)
public void test_throw_exception_when_no_arguments_are_provided() throws Throwable {
TemplateMethodModel uriMethod = new UriMethod("/context");
uriMethod.exec(emptyList());
}
示例7: test_only_one_argument_is_expected
import freemarker.template.TemplateMethodModel; //导入依赖的package包/类
@Test(expected = TemplateModelException.class)
public void test_only_one_argument_is_expected() throws Throwable {
TemplateMethodModel uriMethod = new UriMethod("/context");
uriMethod.exec(asList("/foo", "/bar"));
}