public class CompilerFacade extends Object implements CompilersConfiguration
| Modifier and Type | Field and Description |
|---|---|
protected java.util.function.Supplier<Compilers> |
compilers |
protected java.util.function.Supplier<HandlebarsCompiler> |
handlebars |
protected Resources |
resources |
protected java.util.function.Supplier<ViewCompiler> |
viewCompiler |
| Constructor and Description |
|---|
CompilerFacade(Env env,
Resources resources) |
| Modifier and Type | Method and Description |
|---|---|
void |
addHandlebarsResolver(com.github.jknack.handlebars.ValueResolver resolver) |
boolean |
canCompile(String extension) |
CacheEntry |
compile(java.nio.file.Path path) |
CacheEntry |
compile(SourceFile sourceFile) |
String |
compiledExtension(String extension) |
void |
configureHandlebars(java.util.function.Consumer<com.github.jknack.handlebars.Handlebars> action) |
Set<String> |
extensionsThatCompileTo(String extension) |
java.nio.file.Path |
findPublicSourceFor(String uri) |
String |
handlebar(String template,
Map<String,?> variables) |
void |
registerCompiler(java.util.function.Supplier<Compiler> compilerFactory,
String compiledExtension,
String sourceExtension) |
String |
renderView(String uri,
Map<String,?> variables) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddHandlebarsHelpers, addHandlebarsHelpersprotected final Resources resources
protected final java.util.function.Supplier<Compilers> compilers
protected final java.util.function.Supplier<HandlebarsCompiler> handlebars
protected final java.util.function.Supplier<ViewCompiler> viewCompiler
public void registerCompiler(java.util.function.Supplier<Compiler> compilerFactory, String compiledExtension, String sourceExtension)
registerCompiler in interface CompilersConfigurationpublic void configureHandlebars(java.util.function.Consumer<com.github.jknack.handlebars.Handlebars> action)
configureHandlebars in interface CompilersConfigurationpublic void addHandlebarsResolver(com.github.jknack.handlebars.ValueResolver resolver)
addHandlebarsResolver in interface CompilersConfigurationpublic boolean canCompile(String extension)
public CacheEntry compile(java.nio.file.Path path) throws IOException
IOExceptionpublic CacheEntry compile(SourceFile sourceFile) throws IOException
IOExceptionpublic String handlebar(String template, Map<String,?> variables) throws IOException
IOExceptionpublic java.nio.file.Path findPublicSourceFor(String uri)
Copyright © 2015. All Rights Reserved.