本文整理了Java中freemarker.template.Configuration.setInterpolationSyntax()
方法的一些代码示例,展示了Configuration.setInterpolationSyntax()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Configuration.setInterpolationSyntax()
方法的具体详情如下:
包路径:freemarker.template.Configuration
类名称:Configuration
方法名:setInterpolationSyntax
[英]Determines the interpolation syntax (like ${x}
VS [=x]
) of the template files. Don't confuse this with the tag syntax ( #setTagSyntax(int)); they are independent.
The interpolationSyntax parameter must be one of Configuration#LEGACY_INTERPOLATION_SYNTAX, Configuration#DOLLAR_INTERPOLATION_SYNTAX, and Configuration#SQUARE_BRACKET_INTERPOLATION_SYNTAX. Note that Configuration#SQUARE_BRACKET_INTERPOLATION_SYNTAX does not change to [#if x]; that's tag syntax, so use #setTagSyntax(int) for that.
[中]确定模板文件的插值语法(如${x}
与[=x]
)。不要将其与标记语法(#setTagSyntax(int))混淆;他们是独立的。
插值语法参数必须是配置#传统#插值#语法、配置#美元#插值#语法和配置#方括号#插值#语法之一。请注意,配置#方括号#插值#语法不更改为[#if x];这就是tag语法,所以使用#setTagSyntax(int)来实现。
代码示例来源:origin: org.freemarker/freemarker
|| INTERPOLATION_SYNTAX_KEY_CAMEL_CASE.equals(name)) {
if ("legacy".equals(value)) {
setInterpolationSyntax(LEGACY_INTERPOLATION_SYNTAX);
} else if ("dollar".equals(value)) {
setInterpolationSyntax(DOLLAR_INTERPOLATION_SYNTAX);
} else if ("square_bracket".equals(value) || "squareBracket".equals(value)) {
setInterpolationSyntax(SQUARE_BRACKET_INTERPOLATION_SYNTAX);
} else {
throw invalidSettingValueException(name, value);
代码示例来源:origin: net.sourceforge.fmpp/fmpp
/**
* Sets the {@code interpolationSyntax} setting of FreeMarker.
* Possible values: {@link Configuration#LEGACY_INTERPOLATION_SYNTAX} (default),
* {@link Configuration#DOLLAR_INTERPOLATION_SYNTAX},
* {@link Configuration#SQUARE_BRACKET_INTERPOLATION_SYNTAX}.
*
* @since 0.9.16
*/
public void setInterpolationSyntax(int interpolationSyntax) {
checkParameterLock();
fmCfg.setInterpolationSyntax(interpolationSyntax);
}
代码示例来源:origin: org.freemarker/freemarker-gae
|| INTERPOLATION_SYNTAX_KEY_CAMEL_CASE.equals(name)) {
if ("legacy".equals(value)) {
setInterpolationSyntax(LEGACY_INTERPOLATION_SYNTAX);
} else if ("dollar".equals(value)) {
setInterpolationSyntax(DOLLAR_INTERPOLATION_SYNTAX);
} else if ("square_bracket".equals(value) || "squareBracket".equals(value)) {
setInterpolationSyntax(SQUARE_BRACKET_INTERPOLATION_SYNTAX);
} else {
throw invalidSettingValueException(name, value);
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.freemarker
|| INTERPOLATION_SYNTAX_KEY_CAMEL_CASE.equals(name)) {
if ("legacy".equals(value)) {
setInterpolationSyntax(LEGACY_INTERPOLATION_SYNTAX);
} else if ("dollar".equals(value)) {
setInterpolationSyntax(DOLLAR_INTERPOLATION_SYNTAX);
} else if ("square_bracket".equals(value) || "squareBracket".equals(value)) {
setInterpolationSyntax(SQUARE_BRACKET_INTERPOLATION_SYNTAX);
} else {
throw invalidSettingValueException(name, value);
内容来源于网络,如有侵权,请联系作者删除!