public class RhinoTemplateCompiler extends Object
| Constructor and Description |
|---|
RhinoTemplateCompiler() |
| Modifier and Type | Method and Description |
|---|---|
RhinoTemplate |
compile(Class<?> clz,
String resource,
String encoding)
Get a class resource as a template and compile it.
|
RhinoTemplate |
compile(Reader input,
String sourceName)
Create a template from input.
|
protected void |
error(String string) |
void |
execute(Appendable res,
Reader input,
String sourceName,
IScriptScope scope)
Compile, then execute the specified template once.
|
void |
execute(Appendable res,
Reader input,
String sourceName,
org.mozilla.javascript.Scriptable scope)
Compile, then execute the specified template once.
|
void |
execute(IJSTemplateContext tc,
Reader input,
String sourceName,
org.mozilla.javascript.Scriptable scope)
Compile, then execute the specified template once.
|
String |
getTranslation() |
static void |
strToJavascriptString(StringBuilder w,
CharSequence cs,
boolean dblquote) |
protected void |
translate(Reader input)
Translate input to a Javascript program.
|
@Nonnull public RhinoTemplate compile(Reader input, String sourceName) throws Exception
input - Exceptionpublic String getTranslation()
public RhinoTemplate compile(@Nonnull Class<?> clz, @Nonnull String resource, @Nullable String encoding) throws Exception
clz - resource - encoding - Exceptionpublic void execute(Appendable res, Reader input, String sourceName, org.mozilla.javascript.Scriptable scope) throws Exception
res - input - sourceName - Exceptionpublic void execute(Appendable res, Reader input, String sourceName, IScriptScope scope) throws Exception
res - input - sourceName - Exceptionpublic void execute(IJSTemplateContext tc, Reader input, String sourceName, org.mozilla.javascript.Scriptable scope) throws Exception
tc - input - sourceName - assignments - Exceptionprotected void translate(Reader input) throws Exception
input - Exceptionpublic static void strToJavascriptString(StringBuilder w, CharSequence cs, boolean dblquote)
protected void error(String string)
Copyright © 2017 etc.to. All rights reserved.