1 package org.apache.velocity.runtime.parser.node; 2 3 18 19 import java.io.Writer ; 20 import java.io.IOException ; 21 22 import org.apache.velocity.context.InternalContextAdapter; 23 import org.apache.velocity.runtime.parser.Parser; 24 25 35 public class ASTEscape extends SimpleNode 36 { 37 public String val; 38 private char[] ctext; 39 40 public ASTEscape(int id) 41 { 42 super(id); 43 } 44 45 public ASTEscape(Parser p, int id) 46 { 47 super(p, id); 48 } 49 50 51 public Object jjtAccept(ParserVisitor visitor, Object data) 52 { 53 return visitor.visit(this, data); 54 } 55 56 public Object init( InternalContextAdapter context, Object data) 57 throws Exception 58 { 59 ctext = val.toCharArray(); 60 return data; 61 } 62 63 public boolean render( InternalContextAdapter context, Writer writer) 64 throws IOException 65 { 66 writer.write(ctext); 67 return true; 68 } 69 } 70 | Popular Tags |