01: package org.ztemplates.actions.urlhandler.tree.term;
02:
03: import org.ztemplates.actions.expression.ZParserException;
04: import org.ztemplates.actions.util.ZFormatUtil;
05:
06: public class ZTreeLiteral extends ZTreeTerm {
07: private final String text;
08:
09: public ZTreeLiteral(Class clazz, String text)
10: throws ZParserException {
11: super (clazz);
12: this .text = text;
13: }
14:
15: public String getText() {
16: return text;
17: }
18:
19: @Override
20: public void toXml(StringBuffer sb, int depth) {
21: ZFormatUtil.indent(sb, depth);
22: sb.append("<literal>");
23: sb.append(text);
24: sb.append("</literal>");
25: }
26:
27: @Override
28: public String toDefinition() {
29: return text;
30: }
31: }
|