View Javadoc

1   package org.apache.velocity.runtime.parser;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *   http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.    
20   */
21  
22  import org.apache.velocity.runtime.parser.node.ASTAddNode;
23  import org.apache.velocity.runtime.parser.node.ASTAndNode;
24  import org.apache.velocity.runtime.parser.node.ASTAssignment;
25  import org.apache.velocity.runtime.parser.node.ASTBlock;
26  import org.apache.velocity.runtime.parser.node.ASTComment;
27  import org.apache.velocity.runtime.parser.node.ASTDirective;
28  import org.apache.velocity.runtime.parser.node.ASTDivNode;
29  import org.apache.velocity.runtime.parser.node.ASTEQNode;
30  import org.apache.velocity.runtime.parser.node.ASTElseIfStatement;
31  import org.apache.velocity.runtime.parser.node.ASTElseStatement;
32  import org.apache.velocity.runtime.parser.node.ASTEscape;
33  import org.apache.velocity.runtime.parser.node.ASTEscapedDirective;
34  import org.apache.velocity.runtime.parser.node.ASTExpression;
35  import org.apache.velocity.runtime.parser.node.ASTFalse;
36  import org.apache.velocity.runtime.parser.node.ASTFloatingPointLiteral;
37  import org.apache.velocity.runtime.parser.node.ASTGENode;
38  import org.apache.velocity.runtime.parser.node.ASTGTNode;
39  import org.apache.velocity.runtime.parser.node.ASTIdentifier;
40  import org.apache.velocity.runtime.parser.node.ASTIfStatement;
41  import org.apache.velocity.runtime.parser.node.ASTIntegerLiteral;
42  import org.apache.velocity.runtime.parser.node.ASTIntegerRange;
43  import org.apache.velocity.runtime.parser.node.ASTLENode;
44  import org.apache.velocity.runtime.parser.node.ASTLTNode;
45  import org.apache.velocity.runtime.parser.node.ASTMap;
46  import org.apache.velocity.runtime.parser.node.ASTMethod;
47  import org.apache.velocity.runtime.parser.node.ASTModNode;
48  import org.apache.velocity.runtime.parser.node.ASTMulNode;
49  import org.apache.velocity.runtime.parser.node.ASTNENode;
50  import org.apache.velocity.runtime.parser.node.ASTNotNode;
51  import org.apache.velocity.runtime.parser.node.ASTObjectArray;
52  import org.apache.velocity.runtime.parser.node.ASTOrNode;
53  import org.apache.velocity.runtime.parser.node.ASTReference;
54  import org.apache.velocity.runtime.parser.node.ASTSetDirective;
55  import org.apache.velocity.runtime.parser.node.ASTStop;
56  import org.apache.velocity.runtime.parser.node.ASTStringLiteral;
57  import org.apache.velocity.runtime.parser.node.ASTSubtractNode;
58  import org.apache.velocity.runtime.parser.node.ASTText;
59  import org.apache.velocity.runtime.parser.node.ASTTrue;
60  import org.apache.velocity.runtime.parser.node.ASTWord;
61  import org.apache.velocity.runtime.parser.node.ASTprocess;
62  import org.apache.velocity.runtime.parser.node.SimpleNode;
63  
64  /**
65   *
66   */
67  public interface ParserVisitor
68  {
69    /**
70     * @param node
71     * @param data
72     * @return The object rendered by this node.
73     */
74    public Object visit(SimpleNode node, Object data);
75  
76    /**
77     * @param node
78     * @param data
79     * @return The object rendered by this node.
80     */
81    public Object visit(ASTprocess node, Object data);
82  
83    /**
84     * @param node
85     * @param data
86     * @return The object rendered by this node.
87     */
88    public Object visit(ASTEscapedDirective node, Object data);
89  
90    /**
91     * @param node
92     * @param data
93     * @return The object rendered by this node.
94     */
95    public Object visit(ASTEscape node, Object data);
96  
97    /**
98     * @param node
99     * @param data
100    * @return The object rendered by this node.
101    */
102   public Object visit(ASTComment node, Object data);
103 
104   /**
105    * @param node
106    * @param data
107    * @return The object rendered by this node.
108    */
109   public Object visit(ASTFloatingPointLiteral node, Object data);
110 
111   /**
112    * @param node
113    * @param data
114    * @return The object rendered by this node.
115    */
116   public Object visit(ASTIntegerLiteral node, Object data);
117 
118   /**
119    * @param node
120    * @param data
121    * @return The object rendered by this node.
122    */
123   public Object visit(ASTStringLiteral node, Object data);
124 
125   /**
126    * @param node
127    * @param data
128    * @return The object rendered by this node.
129    */
130   public Object visit(ASTIdentifier node, Object data);
131 
132   /**
133    * @param node
134    * @param data
135    * @return The object rendered by this node.
136    */
137   public Object visit(ASTWord node, Object data);
138 
139   /**
140    * @param node
141    * @param data
142    * @return The object rendered by this node.
143    */
144   public Object visit(ASTDirective node, Object data);
145 
146   /**
147    * @param node
148    * @param data
149    * @return The object rendered by this node.
150    */
151   public Object visit(ASTBlock node, Object data);
152 
153   /**
154    * @param node
155    * @param data
156    * @return The object rendered by this node.
157    */
158   public Object visit(ASTMap node, Object data);
159 
160   /**
161    * @param node
162    * @param data
163    * @return The object rendered by this node.
164    */
165   public Object visit(ASTObjectArray node, Object data);
166 
167   /**
168    * @param node
169    * @param data
170    * @return The object rendered by this node.
171    */
172   public Object visit(ASTIntegerRange node, Object data);
173 
174   /**
175    * @param node
176    * @param data
177    * @return The object rendered by this node.
178    */
179   public Object visit(ASTMethod node, Object data);
180 
181   /**
182    * @param node
183    * @param data
184    * @return The object rendered by this node.
185    */
186   public Object visit(ASTReference node, Object data);
187 
188   /**
189    * @param node
190    * @param data
191    * @return The object rendered by this node.
192    */
193   public Object visit(ASTTrue node, Object data);
194 
195   /**
196    * @param node
197    * @param data
198    * @return The object rendered by this node.
199    */
200   public Object visit(ASTFalse node, Object data);
201 
202   /**
203    * @param node
204    * @param data
205    * @return The object rendered by this node.
206    */
207   public Object visit(ASTText node, Object data);
208 
209   /**
210    * @param node
211    * @param data
212    * @return The object rendered by this node.
213    */
214   public Object visit(ASTIfStatement node, Object data);
215 
216   /**
217    * @param node
218    * @param data
219    * @return The object rendered by this node.
220    */
221   public Object visit(ASTElseStatement node, Object data);
222 
223   /**
224    * @param node
225    * @param data
226    * @return The object rendered by this node.
227    */
228   public Object visit(ASTElseIfStatement node, Object data);
229 
230   /**
231    * @param node
232    * @param data
233    * @return The object rendered by this node.
234    */
235   public Object visit(ASTSetDirective node, Object data);
236 
237   /**
238    * @param node
239    * @param data
240    * @return The object rendered by this node.
241    */
242   public Object visit(ASTStop node, Object data);
243 
244   /**
245    * @param node
246    * @param data
247    * @return The object rendered by this node.
248    */
249   public Object visit(ASTExpression node, Object data);
250 
251   /**
252    * @param node
253    * @param data
254    * @return The object rendered by this node.
255    */
256   public Object visit(ASTAssignment node, Object data);
257 
258   /**
259    * @param node
260    * @param data
261    * @return The object rendered by this node.
262    */
263   public Object visit(ASTOrNode node, Object data);
264 
265   /**
266    * @param node
267    * @param data
268    * @return The object rendered by this node.
269    */
270   public Object visit(ASTAndNode node, Object data);
271 
272   /**
273    * @param node
274    * @param data
275    * @return The object rendered by this node.
276    */
277   public Object visit(ASTEQNode node, Object data);
278 
279   /**
280    * @param node
281    * @param data
282    * @return The object rendered by this node.
283    */
284   public Object visit(ASTNENode node, Object data);
285 
286   /**
287    * @param node
288    * @param data
289    * @return The object rendered by this node.
290    */
291   public Object visit(ASTLTNode node, Object data);
292 
293   /**
294    * @param node
295    * @param data
296    * @return The object rendered by this node.
297    */
298   public Object visit(ASTGTNode node, Object data);
299 
300   /**
301    * @param node
302    * @param data
303    * @return The object rendered by this node.
304    */
305   public Object visit(ASTLENode node, Object data);
306 
307   /**
308    * @param node
309    * @param data
310    * @return The object rendered by this node.
311    */
312   public Object visit(ASTGENode node, Object data);
313 
314   /**
315    * @param node
316    * @param data
317    * @return The object rendered by this node.
318    */
319   public Object visit(ASTAddNode node, Object data);
320 
321   /**
322    * @param node
323    * @param data
324    * @return The object rendered by this node.
325    */
326   public Object visit(ASTSubtractNode node, Object data);
327 
328   /**
329    * @param node
330    * @param data
331    * @return The object rendered by this node.
332    */
333   public Object visit(ASTMulNode node, Object data);
334 
335   /**
336    * @param node
337    * @param data
338    * @return The object rendered by this node.
339    */
340   public Object visit(ASTDivNode node, Object data);
341 
342   /**
343    * @param node
344    * @param data
345    * @return The object rendered by this node.
346    */
347   public Object visit(ASTModNode node, Object data);
348 
349   /**
350    * @param node
351    * @param data
352    * @return The object rendered by this node.
353    */
354   public Object visit(ASTNotNode node, Object data);
355 
356   /**
357    * @param node
358    * @param data
359    * @return The object rendered by this node.
360    */
361 }