KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > velocity > runtime > parser > node > ASTEscapedDirective


1 package org.apache.velocity.runtime.parser.node;
2
3 /*
4  * Copyright 2000-2001,2004 The Apache Software Foundation.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18
19 import java.io.Writer JavaDoc;
20 import java.io.IOException JavaDoc;
21
22 import org.apache.velocity.context.InternalContextAdapter;
23 import org.apache.velocity.runtime.parser.Parser;
24
25 /**
26  * This class is responsible for handling EscapedDirectives
27  * in VTL.
28  *
29  * Please look at the Parser.jjt file which is
30  * what controls the generation of this class.
31  *
32  * @author <a HREF="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
33  * @version $Id: ASTEscapedDirective.java,v 1.3.14.1 2004/03/03 23:22:58 geirm Exp $
34  */

35 public class ASTEscapedDirective extends SimpleNode
36 {
37     public ASTEscapedDirective(int id)
38     {
39         super(id);
40     }
41
42     public ASTEscapedDirective(Parser p, int id)
43     {
44         super(p, id);
45     }
46
47
48     /** Accept the visitor. **/
49     public Object JavaDoc jjtAccept(ParserVisitor visitor, Object JavaDoc data)
50     {
51         return visitor.visit(this, data);
52     }
53
54     public boolean render(InternalContextAdapter context, Writer JavaDoc writer)
55         throws IOException JavaDoc
56     {
57         writer.write(getFirstToken().image);
58         return true;
59     }
60
61 }
62
Popular Tags