Source Code Cross Referenced for AnnotationMemberType.java in  » Library » Apache-beehive-1.0.2-src » org » apache » beehive » netui » compiler » 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 » Library » Apache beehive 1.0.2 src » org.apache.beehive.netui.compiler 
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:         * $Header:$
018:         */
019:        package org.apache.beehive.netui.compiler;
020:
021:        import org.apache.beehive.netui.compiler.typesystem.declaration.AnnotationInstance;
022:        import org.apache.beehive.netui.compiler.typesystem.declaration.AnnotationTypeElementDeclaration;
023:        import org.apache.beehive.netui.compiler.typesystem.declaration.AnnotationValue;
024:        import org.apache.beehive.netui.compiler.typesystem.declaration.Declaration;
025:        import org.apache.beehive.netui.compiler.typesystem.declaration.MemberDeclaration;
026:        import org.apache.beehive.netui.compiler.typesystem.env.CoreAnnotationProcessorEnv;
027:
028:        public class AnnotationMemberType implements  JpfLanguageConstants {
029:            /** set if this entire attribute type requires a particular runtime version. */
030:            private String _requiredRuntimeVersion = null;
031:            private AnnotationGrammar _parentGrammar;
032:            private AnnotationMemberType _nextInChain;
033:
034:            public AnnotationMemberType(String requiredRuntimeVersion,
035:                    AnnotationGrammar parentGrammar) {
036:                _requiredRuntimeVersion = requiredRuntimeVersion;
037:                _parentGrammar = parentGrammar;
038:            }
039:
040:            public AnnotationMemberType(String requiredRuntimeVersion,
041:                    AnnotationGrammar parentGrammar,
042:                    AnnotationMemberType nextInChain) {
043:                this (requiredRuntimeVersion, parentGrammar);
044:                _nextInChain = nextInChain;
045:            }
046:
047:            /**
048:             * @return a result (any Object) that will be passed back to the parent checker.  May be null</code>.
049:             */
050:            public final Object check(
051:                    AnnotationTypeElementDeclaration valueDecl,
052:                    AnnotationValue value,
053:                    AnnotationInstance[] parentAnnotations,
054:                    MemberDeclaration classMember, int annotationArrayIndex)
055:                    throws FatalCompileTimeException {
056:                //
057:                // First check to see if this attribute requires a particular runtime version.
058:                //
059:                String valueName = valueDecl.getSimpleName();
060:                Diagnostics diags = _parentGrammar.getDiagnostics();
061:                _parentGrammar.getRuntimeVersionChecker().checkRuntimeVersion(
062:                        _requiredRuntimeVersion, value, diags,
063:                        "error.required-runtime-version-attribute",
064:                        new Object[] { valueName, PAGEFLOW_RUNTIME_JAR });
065:
066:                // for derived classes
067:                Object retVal = onCheck(valueDecl, value, parentAnnotations,
068:                        classMember, annotationArrayIndex);
069:                if (_nextInChain != null) {
070:                    return _nextInChain.check(valueDecl, value,
071:                            parentAnnotations, classMember,
072:                            annotationArrayIndex);
073:                }
074:                return retVal;
075:            }
076:
077:            /**
078:             * @return a result (any Object) that will be passed back to the parent checker.  May be null</code>.
079:             */
080:            public Object onCheck(AnnotationTypeElementDeclaration valueDecl,
081:                    AnnotationValue member,
082:                    AnnotationInstance[] parentAnnotations,
083:                    MemberDeclaration classMember, int annotationArrayIndex)
084:                    throws FatalCompileTimeException {
085:                return null;
086:            }
087:
088:            protected void addError(Declaration element, String key) {
089:                _parentGrammar.addError(element, key, null);
090:            }
091:
092:            protected void addError(Declaration element, String key,
093:                    Object[] args) {
094:                _parentGrammar.addError(element, key, args);
095:            }
096:
097:            protected void addError(Declaration element, String key, Object arg) {
098:                _parentGrammar.addError(element, key, new Object[] { arg });
099:            }
100:
101:            protected void addError(Declaration element, String key,
102:                    Object arg1, Object arg2) {
103:                _parentGrammar.addError(element, key,
104:                        new Object[] { arg1, arg2 });
105:            }
106:
107:            protected void addError(Declaration element, String key,
108:                    Object arg1, Object arg2, Object arg3) {
109:                _parentGrammar.addError(element, key, new Object[] { arg1,
110:                        arg2, arg3 });
111:            }
112:
113:            protected void addError(AnnotationValue element, String key) {
114:                _parentGrammar.addError(element, key, null);
115:            }
116:
117:            protected void addError(AnnotationValue element, String key,
118:                    Object[] args) {
119:                _parentGrammar.addError(element, key, args);
120:            }
121:
122:            protected void addError(AnnotationValue element, String key,
123:                    Object arg1) {
124:                _parentGrammar.addError(element, key, new Object[] { arg1 });
125:            }
126:
127:            protected void addError(AnnotationValue element, String key,
128:                    Object arg1, Object arg2) {
129:                _parentGrammar.addError(element, key,
130:                        new Object[] { arg1, arg2 });
131:            }
132:
133:            protected void addError(AnnotationValue element, String key,
134:                    Object arg1, Object arg2, Object arg3) {
135:                _parentGrammar.addError(element, key, new Object[] { arg1,
136:                        arg2, arg3 });
137:            }
138:
139:            protected void addError(AnnotationInstance element, String key) {
140:                _parentGrammar.addError(element, key, null);
141:            }
142:
143:            protected void addError(AnnotationInstance element, String key,
144:                    Object[] args) {
145:                _parentGrammar.addError(element, key, args);
146:            }
147:
148:            protected void addError(AnnotationInstance element, String key,
149:                    Object arg1) {
150:                _parentGrammar.addError(element, key, new Object[] { arg1 });
151:            }
152:
153:            protected void addError(AnnotationInstance element, String key,
154:                    Object arg1, Object arg2) {
155:                _parentGrammar.addError(element, key,
156:                        new Object[] { arg1, arg2 });
157:            }
158:
159:            protected void addError(AnnotationInstance element, String key,
160:                    Object arg1, Object arg2, Object arg3) {
161:                _parentGrammar.addError(element, key, new Object[] { arg1,
162:                        arg2, arg3 });
163:            }
164:
165:            protected void addWarning(Declaration element, String key) {
166:                _parentGrammar.addWarning(element, key, null);
167:            }
168:
169:            protected void addWarning(Declaration element, String key,
170:                    Object[] args) {
171:                _parentGrammar.addWarning(element, key, args);
172:            }
173:
174:            protected void addWarning(Declaration element, String key,
175:                    Object arg) {
176:                _parentGrammar.addWarning(element, key, new Object[] { arg });
177:            }
178:
179:            protected void addWarning(Declaration element, String key,
180:                    Object arg1, Object arg2) {
181:                _parentGrammar.addWarning(element, key, new Object[] { arg1,
182:                        arg2 });
183:            }
184:
185:            protected void addWarning(Declaration element, String key,
186:                    Object arg1, Object arg2, Object arg3) {
187:                _parentGrammar.addWarning(element, key, new Object[] { arg1,
188:                        arg2, arg3 });
189:            }
190:
191:            protected void addWarning(AnnotationValue element, String key) {
192:                _parentGrammar.addWarning(element, key, null);
193:            }
194:
195:            protected void addWarning(AnnotationValue element, String key,
196:                    Object[] args) {
197:                _parentGrammar.addWarning(element, key, args);
198:            }
199:
200:            protected void addWarning(AnnotationValue element, String key,
201:                    Object arg1) {
202:                _parentGrammar.addWarning(element, key, new Object[] { arg1 });
203:            }
204:
205:            protected void addWarning(AnnotationValue element, String key,
206:                    Object arg1, Object arg2) {
207:                _parentGrammar.addWarning(element, key, new Object[] { arg1,
208:                        arg2 });
209:            }
210:
211:            protected void addWarning(AnnotationValue element, String key,
212:                    Object arg1, Object arg2, Object arg3) {
213:                _parentGrammar.addWarning(element, key, new Object[] { arg1,
214:                        arg2, arg3 });
215:            }
216:
217:            protected void addWarning(AnnotationInstance element, String key) {
218:                _parentGrammar.addWarning(element, key, null);
219:            }
220:
221:            protected void addWarning(AnnotationInstance element, String key,
222:                    Object[] args) {
223:                _parentGrammar.addWarning(element, key, args);
224:            }
225:
226:            protected void addWarning(AnnotationInstance element, String key,
227:                    Object arg1) {
228:                _parentGrammar.addWarning(element, key, new Object[] { arg1 });
229:            }
230:
231:            protected void addWarning(AnnotationInstance element, String key,
232:                    Object arg1, Object arg2) {
233:                _parentGrammar.addWarning(element, key, new Object[] { arg1,
234:                        arg2 });
235:            }
236:
237:            protected void addWarning(AnnotationInstance element, String key,
238:                    Object arg1, Object arg2, Object arg3) {
239:                _parentGrammar.addWarning(element, key, new Object[] { arg1,
240:                        arg2, arg3 });
241:            }
242:
243:            protected AnnotationGrammar getParentGrammar() {
244:                return _parentGrammar;
245:            }
246:
247:            protected final CoreAnnotationProcessorEnv getEnv() {
248:                return _parentGrammar.getEnv();
249:            }
250:
251:            protected final Diagnostics getDiagnostics() {
252:                return _parentGrammar.getDiagnostics();
253:            }
254:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.