本文整理了Java中freemarker.core.Environment.isAPIBuiltinEnabled()
方法的一些代码示例,展示了Environment.isAPIBuiltinEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Environment.isAPIBuiltinEnabled()
方法的具体详情如下:
包路径:freemarker.core.Environment
类名称:Environment
方法名:isAPIBuiltinEnabled
暂无
代码示例来源:origin: org.freemarker/freemarker
@Override
TemplateModel _eval(Environment env) throws TemplateException {
if (!env.isAPIBuiltinEnabled()) {
throw new _MiscTemplateException(this,
"Can't use ?api, because the \"", Configurable.API_BUILTIN_ENABLED_KEY,
"\" configuration setting is false. Think twice before you set it to true though. Especially, "
+ "it shouldn't abused for modifying Map-s and Collection-s.");
}
final TemplateModel tm = target.eval(env);
if (!(tm instanceof TemplateModelWithAPISupport)) {
target.assertNonNull(tm, env);
throw new APINotSupportedTemplateException(env, target, tm);
}
return ((TemplateModelWithAPISupport) tm).getAPI();
}
}
代码示例来源:origin: org.freemarker/freemarker-gae
@Override
TemplateModel _eval(Environment env) throws TemplateException {
if (!env.isAPIBuiltinEnabled()) {
throw new _MiscTemplateException(this,
"Can't use ?api, because the \"", Configurable.API_BUILTIN_ENABLED_KEY,
"\" configuration setting is false. Think twice before you set it to true though. Especially, "
+ "it shouldn't abused for modifying Map-s and Collection-s.");
}
final TemplateModel tm = target.eval(env);
if (!(tm instanceof TemplateModelWithAPISupport)) {
target.assertNonNull(tm, env);
throw new APINotSupportedTemplateException(env, target, tm);
}
return ((TemplateModelWithAPISupport) tm).getAPI();
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.freemarker
@Override
TemplateModel _eval(Environment env) throws TemplateException {
if (!env.isAPIBuiltinEnabled()) {
throw new _MiscTemplateException(this,
"Can't use ?api, because the \"", Configurable.API_BUILTIN_ENABLED_KEY,
"\" configuration setting is false. Think twice before you set it to true though. Especially, "
+ "it shouldn't abused for modifying Map-s and Collection-s.");
}
final TemplateModel tm = target.eval(env);
if (!(tm instanceof TemplateModelWithAPISupport)) {
target.assertNonNull(tm, env);
throw new APINotSupportedTemplateException(env, target, tm);
}
return ((TemplateModelWithAPISupport) tm).getAPI();
}
}
内容来源于网络,如有侵权,请联系作者删除!