本文整理汇总了Java中de.neuland.jade4j.template.TemplateLoader类的典型用法代码示例。如果您正苦于以下问题:Java TemplateLoader类的具体用法?Java TemplateLoader怎么用?Java TemplateLoader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TemplateLoader类属于de.neuland.jade4j.template包,在下文中一共展示了TemplateLoader类的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: JadeTemplateEngine
import de.neuland.jade4j.template.TemplateLoader; //导入依赖的package包/类
public JadeTemplateEngine(final CompositeConfiguration config, final ContentStore db, final File destination, final File templatesPath) {
super(config, db, destination, templatesPath);
TemplateLoader loader = new FileTemplateLoader(templatesPath.getAbsolutePath() + File.separatorChar, config.getString(Keys.TEMPLATE_ENCODING));
jadeConfiguration.setTemplateLoader(loader);
jadeConfiguration.setMode(Jade4J.Mode.XHTML);
jadeConfiguration.setPrettyPrint(true);
jadeConfiguration.setFilter(FILTER_CDATA, new CDATAFilter());
jadeConfiguration.setFilter(FILTER_SCRIPT, new JsFilter());
jadeConfiguration.setFilter(FILTER_STYLE, new CssFilter());
jadeConfiguration.getSharedVariables().put("formatter", new FormatHelper());
}
开发者ID:ghaseminya,项目名称:jbake-rtl-jalaali,代码行数:13,代码来源:JadeTemplateEngine.java
示例2: Parser
import de.neuland.jade4j.template.TemplateLoader; //导入依赖的package包/类
public Parser(String filename, TemplateLoader templateLoader,ExpressionHandler expressionHandler) throws IOException {
this.filename = filename;
this.templateLoader = templateLoader;
this.expressionHandler = expressionHandler;
lexer = new Lexer(filename, templateLoader,expressionHandler);
characterParser = new CharacterParser();
getContexts().push(this);
}
开发者ID:eamonfoy,项目名称:trello-to-markdown,代码行数:9,代码来源:Parser.java
示例3: createTemplate
import de.neuland.jade4j.template.TemplateLoader; //导入依赖的package包/类
private static JadeTemplate createTemplate(String filename, TemplateLoader loader, ExpressionHandler expressionHandler) throws IOException {
Parser parser = new Parser(filename, loader,expressionHandler);
Node root = parser.parse();
JadeTemplate template = new JadeTemplate();
template.setExpressionHandler(expressionHandler);
template.setTemplateLoader(loader);
template.setRootNode(root);
return template;
}
开发者ID:eamonfoy,项目名称:trello-to-markdown,代码行数:10,代码来源:Jade4J.java
示例4: Lexer
import de.neuland.jade4j.template.TemplateLoader; //导入依赖的package包/类
public Lexer(String filename, TemplateLoader templateLoader,ExpressionHandler expressionHandler) throws IOException {
this.expressionHandler = expressionHandler;
this.filename = ensureJadeExtension(filename);
this.templateLoader = templateLoader;
Reader reader = templateLoader.getReader(this.filename);
options = new LinkedList<String>();
scanner = new Scanner(reader);
deferredTokens = new LinkedList<Token>();
stash = new LinkedList<Token>();
indentStack = new LinkedList<Integer>();
lastIndents = 0;
lineno = 1;
characterParser = new CharacterParser();
}
开发者ID:eamonfoy,项目名称:trello-to-markdown,代码行数:15,代码来源:Lexer.java
示例5: jadeConfiguration
import de.neuland.jade4j.template.TemplateLoader; //导入依赖的package包/类
@Bean
@ConditionalOnMissingBean(JadeConfiguration.class)
public JadeConfiguration jadeConfiguration(TemplateLoader jadeTemplateLoader) {
JadeConfiguration configuration = new JadeConfiguration();
configuration.setCaching(false); //Cache is handled by spring
configuration.setPrettyPrint(properties.isPrettyPrint());
configuration.setTemplateLoader(jadeTemplateLoader);
//configuration.setSharedVariables(sharedVariables);
//configuration.setFilter(name, filter);
//configuration.setMode(mode);
return configuration;
}
开发者ID:marlonbernardes,项目名称:spring-boot-jade,代码行数:13,代码来源:JadeAutoConfiguration.java
示例6: jadeTemplateLoader
import de.neuland.jade4j.template.TemplateLoader; //导入依赖的package包/类
@Bean
@ConditionalOnMissingBean(TemplateLoader.class)
public TemplateLoader jadeTemplateLoader() {
JadeResourceTemplateLoader loader = new JadeResourceTemplateLoader(properties.getPrefix(), properties.getSuffix());
loader.setCharSet(properties.getCharSet());
return loader;
}
开发者ID:marlonbernardes,项目名称:spring-boot-jade,代码行数:8,代码来源:JadeAutoConfiguration.java
示例7: jadeConfiguration
import de.neuland.jade4j.template.TemplateLoader; //导入依赖的package包/类
@Bean
public JadeConfiguration jadeConfiguration(TemplateLoader jadeTemplateLoader) {
JadeConfiguration configuration = new JadeConfiguration();
configuration.setCaching(false);
configuration.setPrettyPrint(true);
configuration.setTemplateLoader(jadeTemplateLoader);
return configuration;
}
开发者ID:marlonbernardes,项目名称:spring-boot-jade,代码行数:9,代码来源:ApplicationTests.java
示例8: JadeParserException
import de.neuland.jade4j.template.TemplateLoader; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
public JadeParserException(String filename, int lineNumber, TemplateLoader templateLoader, Class expected, Class got) {
super("expected " + expected + " but got " + got, filename, lineNumber, templateLoader, null);
}
开发者ID:eamonfoy,项目名称:trello-to-markdown,代码行数:5,代码来源:JadeParserException.java
示例9: JadeCompilerException
import de.neuland.jade4j.template.TemplateLoader; //导入依赖的package包/类
public JadeCompilerException(Node node, TemplateLoader templateLoader, Throwable e) {
super(e.getMessage(), node.getFileName(), node.getLineNumber(), templateLoader, e);
}
开发者ID:eamonfoy,项目名称:trello-to-markdown,代码行数:4,代码来源:JadeCompilerException.java
示例10: JadeException
import de.neuland.jade4j.template.TemplateLoader; //导入依赖的package包/类
public JadeException(String message, String filename, int lineNumber, TemplateLoader templateLoader, Throwable e) {
super(message, e);
this.filename = filename;
this.lineNumber = lineNumber;
this.templateLoader = templateLoader;
}
开发者ID:eamonfoy,项目名称:trello-to-markdown,代码行数:7,代码来源:JadeException.java
示例11: JadeLexerException
import de.neuland.jade4j.template.TemplateLoader; //导入依赖的package包/类
public JadeLexerException(String message, String filename, int lineNumber, TemplateLoader templateLoader) {
super(message, filename, lineNumber, templateLoader, null);
}
开发者ID:eamonfoy,项目名称:trello-to-markdown,代码行数:4,代码来源:JadeLexerException.java
示例12: getTemplateLoader
import de.neuland.jade4j.template.TemplateLoader; //导入依赖的package包/类
public TemplateLoader getTemplateLoader() {
return templateLoader;
}
开发者ID:eamonfoy,项目名称:trello-to-markdown,代码行数:4,代码来源:JadeConfiguration.java
示例13: setTemplateLoader
import de.neuland.jade4j.template.TemplateLoader; //导入依赖的package包/类
public void setTemplateLoader(TemplateLoader templateLoader) {
this.templateLoader = templateLoader;
}
开发者ID:eamonfoy,项目名称:trello-to-markdown,代码行数:4,代码来源:JadeConfiguration.java
示例14: JadeEngine
import de.neuland.jade4j.template.TemplateLoader; //导入依赖的package包/类
public JadeEngine() throws IOException {
this.configuration = new JadeConfiguration();
this.directory = this.directory + "/src/main/resources/templates/";
TemplateLoader loader = new FileTemplateLoader(directory, "UTF-8");
configuration.setTemplateLoader(loader);
}
开发者ID:leonanluppi,项目名称:spark-template-jade,代码行数:7,代码来源:JadeEngine.java
示例15: jadeTemplateLoader
import de.neuland.jade4j.template.TemplateLoader; //导入依赖的package包/类
@Bean
public TemplateLoader jadeTemplateLoader() {
JadeResourceTemplateLoader loader = new JadeResourceTemplateLoader("classpath:/templates/", ".jade");
loader.setCharSet("utf-8");
return loader;
}
开发者ID:marlonbernardes,项目名称:spring-boot-jade,代码行数:7,代码来源:ApplicationTests.java
示例16: IOTemplateLoader
import de.neuland.jade4j.template.TemplateLoader; //导入依赖的package包/类
public IOTemplateLoader(final TemplateLoader loader) {
this.loader = loader;
}
开发者ID:jooby-project,项目名称:jooby,代码行数:4,代码来源:Jade.java
注:本文中的de.neuland.jade4j.template.TemplateLoader类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论