|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ujac.util.template.BaseTemplateInterpreter org.ujac.util.template.DefaultTemplateInterpreter
public class DefaultTemplateInterpreter
Name: DefaultTemplateInterpreter
Description: Default TemplateInterpreter implementation.
Field Summary |
---|
Fields inherited from class org.ujac.util.template.BaseTemplateInterpreter |
---|
exi, expressionFilter, tokenTypes |
Constructor Summary | |
---|---|
DefaultTemplateInterpreter()
Constructs a TemplateInterpreter instance with specific attributes. |
|
DefaultTemplateInterpreter(ExpressionInterpreter exi)
Constructs a TemplateInterpreter instance with specific attributes. |
Method Summary | |
---|---|
Object |
clone()
|
String |
execute(String template,
TemplateContext ctx)
Executes the given template. |
void |
execute(String template,
Writer writer,
TemplateContext ctx)
Executes the given template. |
void |
execute(TemplateRoot template,
Writer writer,
TemplateContext ctx)
Executes the given template. |
TemplateRoot |
parse(char[] source)
Parses the given template source code. |
TemplateRoot |
parse(String source)
Parses the given template source code. |
int |
parse(TemplateTokenContainer tokenContainer)
Parses the given template token. |
Methods inherited from class org.ujac.util.template.BaseTemplateInterpreter |
---|
createToken, evalBooleanExpr, evalBooleanExpr, evalDateExpr, evalDateExpr, evalDoubleExpr, evalDoubleExpr, evalFloatExpr, evalFloatExpr, evalIntExpr, evalIntExpr, evalLongExpr, evalLongExpr, evalObjectExpr, evalObjectExpr, evalStringExpr, evalStringExpr, evalTimeExpr, evalTimeExpr, evalTimestampExpr, evalTimestampExpr, getExpressionFilter, getTokenType, parse, parseExpr, parseExpr, registerTokenTypes, setExpressionFilter |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultTemplateInterpreter()
public DefaultTemplateInterpreter(ExpressionInterpreter exi)
exi
- The expression interpreter to use.Method Detail |
---|
public TemplateRoot parse(String source) throws TemplateException, IOException
parse
in interface TemplateInterpreter
parse
in class BaseTemplateInterpreter
source
- The source to parse.
TemplateException
- If the expression could not be
successfuly resolved
IOException
- In case a I/O problem occured while writing the
expression result.public TemplateRoot parse(char[] source) throws TemplateException, IOException
source
- The source to parse.
TemplateException
- If the expression could not be
successfuly resolved
IOException
- In case a I/O problem occured while writing the
expression result.public int parse(TemplateTokenContainer tokenContainer) throws TemplateException, IOException
parse
in class BaseTemplateInterpreter
tokenContainer
- The token container to fill.
TemplateException
- If the expression could not be
successfuly resolved
IOException
- In case a I/O problem occured while writing the
expression result.public String execute(String template, TemplateContext ctx) throws TemplateException
execute
in interface TemplateInterpreter
execute
in class BaseTemplateInterpreter
template
- The source code of the template to execute.ctx
- The template context to use.
TemplateException
- If the an expression could not be
successfuly resolvedpublic void execute(String template, Writer writer, TemplateContext ctx) throws TemplateException, IOException
execute
in interface TemplateInterpreter
execute
in class BaseTemplateInterpreter
template
- The source code of the template to execute.writer
- The writer to output the result to.ctx
- The template context to use.
TemplateException
- If the an expression could not be
successfuly resolved
IOException
- If something went wrong while writing the
result to the given writer.public void execute(TemplateRoot template, Writer writer, TemplateContext ctx) throws TemplateException, IOException
execute
in interface TemplateInterpreter
execute
in class BaseTemplateInterpreter
template
- The root element of the template parse result.writer
- The writer to output the result to.ctx
- The template context to use.
TemplateException
- If the an expression could not be
successfuly resolved
IOException
- If something went wrong while writing the
result to the given writer.public Object clone()
clone
in class Object
Object.clone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |