1 package org.apache.velocity.runtime.parser.node;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.io.Writer;
23 import java.io.IOException;
24
25 import org.apache.velocity.context.InternalContextAdapter;
26 import org.apache.velocity.runtime.parser.Parser;
27 import org.apache.velocity.runtime.parser.ParserVisitor;
28
29 import org.apache.velocity.exception.MethodInvocationException;
30 import org.apache.velocity.exception.ParseErrorException;
31 import org.apache.velocity.exception.ResourceNotFoundException;
32
33
34
35
36
37 public class ASTBlock extends SimpleNode
38 {
39
40
41
42 public ASTBlock(int id)
43 {
44 super(id);
45 }
46
47
48
49
50
51 public ASTBlock(Parser p, int id)
52 {
53 super(p, id);
54 }
55
56
57
58
59 public Object jjtAccept(ParserVisitor visitor, Object data)
60 {
61 return visitor.visit(this, data);
62 }
63
64
65
66
67 public boolean render( InternalContextAdapter context, Writer writer)
68 throws IOException, MethodInvocationException,
69 ResourceNotFoundException, ParseErrorException
70 {
71 int i, k = jjtGetNumChildren();
72
73 for (i = 0; i < k; i++)
74 jjtGetChild(i).render(context, writer);
75
76 return true;
77 }
78 }