Source code: com/arranger/jarl/script/gsp/IGSPLanguage.java
1 package com.arranger.jarl.script.gsp;
2
3 import java.util.Map;
4
5 /**
6 * IGSPLanguage defines the interface for a GSP Language.
7 */
8 public interface IGSPLanguage {
9
10 public static final String LINEFEED = System.getProperty("line.separator");
11
12 /**
13 * Code (<% %>).
14 */
15 public void code(char[] buffer, int start, int length) throws GSPException;
16
17 /**
18 * This is Code declaration.
19 * eg: <code>(<%! %>);</code>
20 */
21 public void decl(char[] buffer, int start, int length) throws GSPException;
22
23 /**
24 * Code to evaluate as a string (<%= %>).
25 */
26 public void eval(char[] buffer, int start, int length) throws GSPException;
27
28 /**
29 * String to print.
30 */
31 public void print(char[] buffer, int start, int length) throws GSPException;
32
33 /**
34 * Processing directive.
35 */
36 public void directive(String directive, Map parameters) throws GSPException;
37
38 /**
39 * Start tag (<prefix:name foo="bar">).
40 */
41 public void tagStart(String prefix, String name, Map parameters) throws GSPException;
42
43 /**
44 * End tag (</prefix:name>).
45 */
46 public void tagEnd(String prefix, String name) throws GSPException;
47 }