1 29 30 package com.caucho.jsp; 31 32 import com.caucho.jsp.cfg.JspPropertyGroup; 33 import com.caucho.jsp.java.JspNode; 34 import com.caucho.vfs.Path; 35 import com.caucho.xml.QName; 36 37 40 abstract public class JspBuilder { 41 protected Path _sourcePath; 43 44 protected String _filename; 46 47 protected int _line; 49 50 protected ParseState _parseState; 52 53 protected JspParser _jspParser; 55 56 protected JspCompiler _jspCompiler; 58 59 private JspPropertyGroup _jspPropertyGroup; 61 62 protected ParseTagManager _tagManager; 64 65 68 abstract public JspGenerator getGenerator(); 69 70 73 abstract public JspNode getRootNode(); 74 75 78 public void setParseState(ParseState parseState) 79 { 80 _parseState = parseState; 81 } 82 83 86 public ParseState getParseState() 87 { 88 return _parseState; 89 } 90 91 94 public void setPageConfig(JspPageConfig pageConfig) 95 { 96 } 97 98 101 public void setJspCompiler(JspCompiler compiler) 102 { 103 _jspCompiler = compiler; 104 } 105 106 109 public JspCompiler getJspCompiler() 110 { 111 return _jspCompiler; 112 } 113 114 117 public void setJspParser(JspParser parser) 118 { 119 _jspParser = parser; 120 } 121 122 125 public JspParser getJspParser() 126 { 127 return _jspParser; 128 } 129 130 133 public void setTagManager(ParseTagManager manager) 134 { 135 _tagManager = manager; 136 } 137 138 141 public ParseTagManager getTagManager() 142 { 143 return _tagManager; 144 } 145 146 149 public void setJspPropertyGroup(JspPropertyGroup jsp) 150 { 151 _jspPropertyGroup = jsp; 152 } 153 154 157 public JspPropertyGroup getJspPropertyGroup() 158 { 159 return _jspPropertyGroup; 160 } 161 162 165 public boolean isFastJstl() 166 { 167 JspPropertyGroup jsp = getJspPropertyGroup(); 168 169 if (jsp == null) 170 return true; 171 else 172 return jsp.isFastJstl(); 173 } 174 175 178 public boolean getRequireSource() 179 { 180 JspPropertyGroup jsp = getJspPropertyGroup(); 181 182 if (jsp == null) 183 return false; 184 else 185 return jsp.getRequireSource(); 186 } 187 188 191 public void setPrototype(boolean isPrototype) 192 { 193 } 194 195 198 public void setLocation(Path sourcePath, String filename, int line) 199 { 200 _sourcePath = sourcePath; 201 _filename = filename; 202 _line = line; 203 } 204 205 208 abstract public void startDocument() 209 throws JspParseException; 210 211 214 abstract public void endDocument() 215 throws JspParseException; 216 217 222 abstract public void startElement(QName qname) 223 throws JspParseException; 224 225 231 abstract public void startPrefixMapping(String prefix, String uri) 232 throws JspParseException; 233 234 240 abstract public void attribute(QName name, String value) 241 throws JspParseException; 242 243 246 abstract public void endAttributes() 247 throws JspParseException; 248 249 254 abstract public void endElement(String name) 255 throws JspParseException; 256 257 262 abstract public void text(String text) 263 throws JspParseException; 264 265 270 public void text(String text, String filename, int startLine, int endLine) 271 throws JspParseException 272 { 273 text(text); 274 } 275 276 279 abstract public JspNode getCurrentNode(); 280 } 281 | Popular Tags |