1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
|
20 | |
|
21 | |
|
22 | |
|
23 | |
package org.webmacro.directive; |
24 | |
|
25 | |
import org.webmacro.Context; |
26 | |
import org.webmacro.FastWriter; |
27 | |
import org.webmacro.PropertyException; |
28 | |
import org.webmacro.TemplateVisitor; |
29 | |
import org.webmacro.engine.BuildContext; |
30 | |
import org.webmacro.engine.BuildException; |
31 | |
|
32 | |
import java.io.IOException; |
33 | |
|
34 | |
|
35 | |
|
36 | |
|
37 | |
|
38 | 0 | public class CommentDirective extends Directive |
39 | |
{ |
40 | |
|
41 | |
private static final int COMMENT_BLOCK = 1; |
42 | |
|
43 | |
private static final ArgDescriptor[] |
44 | 2 | myArgs = new ArgDescriptor[]{ |
45 | |
new LiteralBlockArg(COMMENT_BLOCK) |
46 | |
}; |
47 | |
|
48 | |
private static final DirectiveDescriptor |
49 | 2 | myDescr = new DirectiveDescriptor("comment", null, myArgs, null); |
50 | |
|
51 | |
public static DirectiveDescriptor getDescriptor () |
52 | |
{ |
53 | 6 | return myDescr; |
54 | |
} |
55 | |
|
56 | |
public Object build (DirectiveBuilder builder, |
57 | |
BuildContext bc) |
58 | |
throws BuildException |
59 | |
{ |
60 | 0 | return null; |
61 | |
} |
62 | |
|
63 | |
public void write (FastWriter out, Context context) |
64 | |
throws PropertyException, IOException |
65 | |
{ |
66 | 0 | } |
67 | |
|
68 | |
public void accept (TemplateVisitor v) |
69 | |
{ |
70 | 0 | v.beginDirective(myDescr.name); |
71 | 0 | v.endDirective(); |
72 | 0 | } |
73 | |
} |