public class JinjavaInterpreter extends Object
Modifier and Type | Field and Description |
---|---|
static String |
BLOCK_STUB_END |
static String |
BLOCK_STUB_START |
static String |
INSERT_FLAG |
Constructor and Description |
---|
JinjavaInterpreter(Jinjava application,
Context context,
JinjavaConfig renderConfig) |
JinjavaInterpreter(JinjavaInterpreter orig) |
Modifier and Type | Method and Description |
---|---|
void |
addBlock(String name,
NodeList value) |
void |
addError(TemplateError templateError) |
void |
addExtendParentRoot(Node root) |
void |
enterScope() |
JinjavaConfig |
getConfig() |
JinjavaConfig |
getConfiguration() |
Context |
getContext() |
static JinjavaInterpreter |
getCurrent() |
List<TemplateError> |
getErrors() |
javax.el.ExpressionFactory |
getExpressionFactory() |
int |
getLineNumber() |
String |
getResource(String resource) |
void |
leaveScope() |
Node |
parse(String template) |
static void |
popCurrent() |
static void |
pushCurrent(JinjavaInterpreter interpreter) |
String |
render(Node root) |
String |
render(Node root,
boolean processExtendRoots) |
String |
render(String template) |
String |
renderString(String template) |
Object |
resolveELExpression(String expr,
int lineNumber) |
Object |
resolveObject(String variable,
int lineNumber)
Resolve a variable into an object value.
|
String |
resolveString(String variable,
int lineNumber)
Resolve a variable into a string value.
|
Object |
retraceVariable(String variable,
int lineNumber)
Resolve a variable from the interpreter context, returning null if not found.
|
void |
setLineNumber(int lineNumber) |
public static final String INSERT_FLAG
public static final String BLOCK_STUB_START
public static final String BLOCK_STUB_END
public JinjavaInterpreter(Jinjava application, Context context, JinjavaConfig renderConfig)
public JinjavaInterpreter(JinjavaInterpreter orig)
public JinjavaConfig getConfiguration()
public void addExtendParentRoot(Node root)
public void enterScope()
public void leaveScope()
public Object retraceVariable(String variable, int lineNumber)
variable
- name of variable in contextlineNumber
- current line number, for error reportingpublic Object resolveObject(String variable, int lineNumber)
variable
- name of variable in contextlineNumber
- current line number, for error reportingpublic String resolveString(String variable, int lineNumber)
variable
- name of variable in contextlineNumber
- current line number, for error reportingpublic Context getContext()
public String getResource(String resource) throws IOException
IOException
public JinjavaConfig getConfig()
public javax.el.ExpressionFactory getExpressionFactory()
public void addError(TemplateError templateError)
public List<TemplateError> getErrors()
public int getLineNumber()
public void setLineNumber(int lineNumber)
public static JinjavaInterpreter getCurrent()
public static void pushCurrent(JinjavaInterpreter interpreter)
public static void popCurrent()
Copyright © 2014. All Rights Reserved.