Source Code Cross Referenced for TagAttributeInfo.java in  » Sevlet-Container » apache-tomcat-6.0.14 » javax » servlet » jsp » tagext » 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 » Sevlet Container » apache tomcat 6.0.14 » javax.servlet.jsp.tagext 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         * contributor license agreements.  See the NOTICE file distributed with
004:         * this work for additional information regarding copyright ownership.
005:         * The ASF licenses this file to You under the Apache License, Version 2.0
006:         * (the "License"); you may not use this file except in compliance with
007:         * the License.  You may obtain a copy of the License at
008:         *
009:         *     http://www.apache.org/licenses/LICENSE-2.0
010:         *
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         */
017:
018:        package javax.servlet.jsp.tagext;
019:
020:        /**
021:         * Information on the attributes of a Tag, available at translation time. This
022:         * class is instantiated from the Tag Library Descriptor file (TLD).
023:         * 
024:         * <p>
025:         * Only the information needed to generate code is included here. Other
026:         * information like SCHEMA for validation belongs elsewhere.
027:         */
028:
029:        public class TagAttributeInfo {
030:            /**
031:             * "id" is wired in to be ID. There is no real benefit in having it be
032:             * something else IDREFs are not handled any differently.
033:             */
034:
035:            public static final String ID = "id";
036:
037:            /**
038:             * Constructor for TagAttributeInfo. This class is to be instantiated only
039:             * from the TagLibrary code under request from some JSP code that is parsing
040:             * a TLD (Tag Library Descriptor).
041:             * 
042:             * @param name
043:             *            The name of the attribute.
044:             * @param required
045:             *            If this attribute is required in tag instances.
046:             * @param type
047:             *            The name of the type of the attribute.
048:             * @param reqTime
049:             *            Whether this attribute holds a request-time Attribute.
050:             */
051:
052:            public TagAttributeInfo(String name, boolean required, String type,
053:                    boolean reqTime) {
054:                this .name = name;
055:                this .required = required;
056:                this .type = type;
057:                this .reqTime = reqTime;
058:            }
059:
060:            /**
061:             * JSP 2.0 Constructor for TagAttributeInfo. This class is to be
062:             * instantiated only from the TagLibrary code under request from some JSP
063:             * code that is parsing a TLD (Tag Library Descriptor).
064:             * 
065:             * @param name
066:             *            The name of the attribute.
067:             * @param required
068:             *            If this attribute is required in tag instances.
069:             * @param type
070:             *            The name of the type of the attribute.
071:             * @param reqTime
072:             *            Whether this attribute holds a request-time Attribute.
073:             * @param fragment
074:             *            Whether this attribute is of type JspFragment
075:             * 
076:             * @since 2.0
077:             */
078:
079:            public TagAttributeInfo(String name, boolean required, String type,
080:                    boolean reqTime, boolean fragment) {
081:                this (name, required, type, reqTime);
082:                this .fragment = fragment;
083:            }
084:
085:            /**
086:             * @since JSP 2.1
087:             */
088:            public TagAttributeInfo(String name, boolean required, String type,
089:                    boolean reqTime, boolean fragment, String description,
090:                    boolean deferredValue, boolean deferredMethod,
091:                    String expectedTypeName, String methodSignature) {
092:                this (name, required, type, reqTime, fragment);
093:                this .description = description;
094:                this .deferredValue = deferredValue;
095:                this .deferredMethod = deferredMethod;
096:                this .expectedTypeName = expectedTypeName;
097:                this .methodSignature = methodSignature;
098:            }
099:
100:            /**
101:             * The name of this attribute.
102:             * 
103:             * @return the name of the attribute
104:             */
105:
106:            public String getName() {
107:                return name;
108:            }
109:
110:            /**
111:             * The type (as a String) of this attribute.
112:             * 
113:             * @return the type of the attribute
114:             */
115:
116:            public String getTypeName() {
117:                return type;
118:            }
119:
120:            /**
121:             * Whether this attribute can hold a request-time value.
122:             * 
123:             * @return if the attribute can hold a request-time value.
124:             */
125:
126:            public boolean canBeRequestTime() {
127:                return reqTime;
128:            }
129:
130:            /**
131:             * Whether this attribute is required.
132:             * 
133:             * @return if the attribute is required.
134:             */
135:            public boolean isRequired() {
136:                return required;
137:            }
138:
139:            /**
140:             * Convenience static method that goes through an array of TagAttributeInfo
141:             * objects and looks for "id".
142:             * 
143:             * @param a
144:             *            An array of TagAttributeInfo
145:             * @return The TagAttributeInfo reference with name "id"
146:             */
147:            public static TagAttributeInfo getIdAttribute(TagAttributeInfo a[]) {
148:                for (int i = 0; i < a.length; i++) {
149:                    if (a[i].getName().equals(ID)) {
150:                        return a[i];
151:                    }
152:                }
153:                return null; // no such attribute
154:            }
155:
156:            /**
157:             * Whether this attribute is of type JspFragment.
158:             * 
159:             * @return if the attribute is of type JspFragment
160:             * 
161:             * @since 2.0
162:             */
163:            public boolean isFragment() {
164:                return fragment;
165:            }
166:
167:            /**
168:             * Returns a String representation of this TagAttributeInfo, suitable for
169:             * debugging purposes.
170:             * 
171:             * @return a String representation of this TagAttributeInfo
172:             */
173:            public String toString() {
174:                StringBuffer b = new StringBuffer(64);
175:                b.append("name = " + name + " ");
176:                b.append("type = " + type + " ");
177:                b.append("reqTime = " + reqTime + " ");
178:                b.append("required = " + required + " ");
179:                b.append("fragment = " + fragment + " ");
180:                b.append("deferredValue = " + deferredValue + " ");
181:                b.append("expectedTypeName = " + expectedTypeName + " ");
182:                b.append("deferredMethod = " + deferredMethod + " ");
183:                b.append("methodSignature = " + methodSignature);
184:                return b.toString();
185:            }
186:
187:            /*
188:             * private fields
189:             */
190:            private String name;
191:
192:            private String type;
193:
194:            private boolean reqTime;
195:
196:            private boolean required;
197:
198:            /*
199:             * private fields for JSP 2.0
200:             */
201:            private boolean fragment;
202:
203:            /*
204:             * private fields for JSP 2.1
205:             */
206:            private String description;
207:
208:            private boolean deferredValue;
209:
210:            private boolean deferredMethod;
211:
212:            private String expectedTypeName;
213:
214:            private String methodSignature;
215:
216:            public boolean isDeferredMethod() {
217:                return deferredMethod;
218:            }
219:
220:            public boolean isDeferredValue() {
221:                return deferredValue;
222:            }
223:
224:            public String getDescription() {
225:                return description;
226:            }
227:
228:            public String getExpectedTypeName() {
229:                return expectedTypeName;
230:            }
231:
232:            public String getMethodSignature() {
233:                return methodSignature;
234:            }
235:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.