Source Code Cross Referenced for JspBuilder.java in  » EJB-Server-resin-3.1.5 » resin » com » caucho » jsp » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » EJB Server resin 3.1.5 » resin » com.caucho.jsp 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright (c) 1998-2008 Caucho Technology -- all rights reserved
003:         *
004:         * This file is part of Resin(R) Open Source
005:         *
006:         * Each copy or derived work must preserve the copyright notice and this
007:         * notice unmodified.
008:         *
009:         * Resin Open Source is free software; you can redistribute it and/or modify
010:         * it under the terms of the GNU General Public License as published by
011:         * the Free Software Foundation; either version 2 of the License, or
012:         * (at your option) any later version.
013:         *
014:         * Resin Open Source is distributed in the hope that it will be useful,
015:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
016:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
017:         * of NON-INFRINGEMENT.  See the GNU General Public License for more
018:         * details.
019:         *
020:         * You should have received a copy of the GNU General Public License
021:         * along with Resin Open Source; if not, write to the
022:         *
023:         *   Free Software Foundation, Inc.
024:         *   59 Temple Place, Suite 330
025:         *   Boston, MA 02111-1307  USA
026:         *
027:         * @author Scott Ferguson
028:         */
029:
030:        package com.caucho.jsp;
031:
032:        import com.caucho.jsp.cfg.JspPropertyGroup;
033:        import com.caucho.jsp.java.JspNode;
034:        import com.caucho.vfs.Path;
035:        import com.caucho.xml.QName;
036:
037:        /**
038:         * Generates the nodes for JSP code.
039:         */
040:        abstract public class JspBuilder {
041:            // The current source
042:            protected Path _sourcePath;
043:
044:            // The current filename
045:            protected String _filename;
046:
047:            // The current line
048:            protected int _line;
049:
050:            // The parse state
051:            protected ParseState _parseState;
052:
053:            // The parser
054:            protected JspParser _jspParser;
055:
056:            // The compiler configuration
057:            protected JspCompiler _jspCompiler;
058:
059:            // The jsp property
060:            private JspPropertyGroup _jspPropertyGroup;
061:
062:            // The tag manager
063:            protected ParseTagManager _tagManager;
064:
065:            /**
066:             * Returns the generator.
067:             */
068:            abstract public JspGenerator getGenerator();
069:
070:            /**
071:             * Returns the top node.
072:             */
073:            abstract public JspNode getRootNode();
074:
075:            /**
076:             * Sets the parse state.
077:             */
078:            public void setParseState(ParseState parseState) {
079:                _parseState = parseState;
080:            }
081:
082:            /**
083:             * Returns the parse state.
084:             */
085:            public ParseState getParseState() {
086:                return _parseState;
087:            }
088:
089:            /**
090:             * Sets the page config?
091:             */
092:            public void setPageConfig(JspPageConfig pageConfig) {
093:            }
094:
095:            /**
096:             * Sets the compiler
097:             */
098:            public void setJspCompiler(JspCompiler compiler) {
099:                _jspCompiler = compiler;
100:            }
101:
102:            /**
103:             * Returns the parse state.
104:             */
105:            public JspCompiler getJspCompiler() {
106:                return _jspCompiler;
107:            }
108:
109:            /**
110:             * Sets the parser
111:             */
112:            public void setJspParser(JspParser parser) {
113:                _jspParser = parser;
114:            }
115:
116:            /**
117:             * Returns the parse state.
118:             */
119:            public JspParser getJspParser() {
120:                return _jspParser;
121:            }
122:
123:            /**
124:             * Sets the tag manager
125:             */
126:            public void setTagManager(ParseTagManager manager) {
127:                _tagManager = manager;
128:            }
129:
130:            /**
131:             * Returns the tag manager
132:             */
133:            public ParseTagManager getTagManager() {
134:                return _tagManager;
135:            }
136:
137:            /**
138:             * Sets the jsp-property-group
139:             */
140:            public void setJspPropertyGroup(JspPropertyGroup jsp) {
141:                _jspPropertyGroup = jsp;
142:            }
143:
144:            /**
145:             * Gets the jsp-property-group
146:             */
147:            public JspPropertyGroup getJspPropertyGroup() {
148:                return _jspPropertyGroup;
149:            }
150:
151:            /**
152:             * Returns true if fast-jstl is enabled.
153:             */
154:            public boolean isFastJstl() {
155:                JspPropertyGroup jsp = getJspPropertyGroup();
156:
157:                if (jsp == null)
158:                    return true;
159:                else
160:                    return jsp.isFastJstl();
161:            }
162:
163:            /**
164:             * Returns true if fast-jsf is enabled.
165:             */
166:            public boolean isFastJsf() {
167:                JspPropertyGroup jsp = getJspPropertyGroup();
168:
169:                if (jsp == null)
170:                    return true;
171:                else
172:                    return jsp.isFastJsf();
173:            }
174:
175:            /**
176:             * Returns true if require source is enabled.
177:             */
178:            public boolean getRequireSource() {
179:                JspPropertyGroup jsp = getJspPropertyGroup();
180:
181:                if (jsp == null)
182:                    return false;
183:                else
184:                    return jsp.getRequireSource();
185:            }
186:
187:            /**
188:             * Set for prototype builder.
189:             */
190:            public void setPrototype(boolean isPrototype) {
191:            }
192:
193:            /**
194:             * Sets the source line number.
195:             */
196:            public void setLocation(Path sourcePath, String filename, int line) {
197:                _sourcePath = sourcePath;
198:                _filename = filename;
199:                _line = line;
200:            }
201:
202:            /**
203:             * Starts the document
204:             */
205:            abstract public void startDocument() throws JspParseException;
206:
207:            /**
208:             * Starts the document
209:             */
210:            abstract public void endDocument() throws JspParseException;
211:
212:            /**
213:             * Starts an element.
214:             *
215:             * @param qname the name of the element to start
216:             */
217:            abstract public void startElement(QName qname)
218:                    throws JspParseException;
219:
220:            /**
221:             * Starts a prefix mapping.
222:             *
223:             * @param prefix the xml prefix
224:             * @param uri the namespace uri
225:             */
226:            abstract public void startPrefixMapping(String prefix, String uri)
227:                    throws JspParseException;
228:
229:            /**
230:             * Adds an attribute to the element.
231:             *
232:             * @param name the attribute name
233:             * @param value the attribute value
234:             */
235:            abstract public void attribute(QName name, String value)
236:                    throws JspParseException;
237:
238:            /**
239:             * Called after the attributes end.
240:             */
241:            abstract public void endAttributes() throws JspParseException;
242:
243:            /**
244:             * Ends an element.
245:             *
246:             * @param name the name of the element to end
247:             */
248:            abstract public void endElement(String name)
249:                    throws JspParseException;
250:
251:            /**
252:             * Adds text.
253:             *
254:             * @param text the text to add
255:             */
256:            abstract public void text(String text) throws JspParseException;
257:
258:            /**
259:             * Adds text.
260:             *
261:             * @param text the text to add
262:             */
263:            public void text(String text, String filename, int startLine,
264:                    int endLine) throws JspParseException {
265:                text(text);
266:            }
267:
268:            public void addNamespace(String prefix, String uri) {
269:                // getParseState().pushNamespace(prefix, uri);
270:                getCurrentNode().addNamespace(prefix, uri);
271:            }
272:
273:            /**
274:             * Returns the current node.
275:             */
276:            abstract public JspNode getCurrentNode();
277:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.