ro.isdc.wro.extensions.processor.support.template
Class AbstractJsTemplateCompiler
java.lang.Object
ro.isdc.wro.extensions.processor.support.template.AbstractJsTemplateCompiler
- Direct Known Subclasses:
- DustJs, EmberJs, HandlebarsJs, HoganJs
public abstract class AbstractJsTemplateCompiler
- extends Object
A base class for template processors like: dustJS or hoganJS.
- Since:
- 1.4.7
- Author:
- Eivind Barstad Waaler
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractJsTemplateCompiler
public AbstractJsTemplateCompiler()
compile
public String compile(String content,
String optionalArgument)
- Compiles the javascript template into plain javascript.
- Parameters:
content
- the template to be compiled.optionalArgument
- any additional arguments used by template script.
- Returns:
- the compiled javascript.
getCompileCommand
protected abstract String getCompileCommand()
- Returns:
- the js statement used to execute the compilation of the template.
getArguments
protected String getArguments()
- Returns:
- additional arguments for the compiler.
getCompilerAsStream
protected abstract InputStream getCompilerAsStream()
throws IOException
- Returns:
- the stream of the compiler resource (javascript) used to compile templates.
- Throws:
IOException
- if the stream could not be located.
Copyright © 2008-2013. All Rights Reserved.