Source Code Cross Referenced for AnnotationValueVisitor.java in  » 6.0-JDK-Modules-sun » javac-compiler » javax » lang » model » element » 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 » 6.0 JDK Modules sun » javac compiler » javax.lang.model.element 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
003:         * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004:         *
005:         * This code is free software; you can redistribute it and/or modify it
006:         * under the terms of the GNU General Public License version 2 only, as
007:         * published by the Free Software Foundation.  Sun designates this
008:         * particular file as subject to the "Classpath" exception as provided
009:         * by Sun in the LICENSE file that accompanied this code.
010:         *
011:         * This code is distributed in the hope that it will be useful, but WITHOUT
012:         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013:         * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
014:         * version 2 for more details (a copy is included in the LICENSE file that
015:         * accompanied this code).
016:         *
017:         * You should have received a copy of the GNU General Public License version
018:         * 2 along with this work; if not, write to the Free Software Foundation,
019:         * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020:         *
021:         * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022:         * CA 95054 USA or visit www.sun.com if you need additional information or
023:         * have any questions.
024:         */
025:
026:        package javax.lang.model.element;
027:
028:        import java.util.List;
029:
030:        import javax.lang.model.type.TypeMirror;
031:
032:        /**
033:         * A visitor of the values of annotation type elements, using a
034:         * variant of the visitor design pattern.  Unlike a standard visitor
035:         * which dispatches based on the concrete type of a member of a type
036:         * hierarchy, this visitor dispatches based on the type of data
037:         * stored; there are no distinct subclasses for storing, for example,
038:         * {@code boolean} values versus {@code int} values.  Classes
039:         * implementing this interface are used to operate on a value when the
040:         * type of that value is unknown at compile time.  When a visitor is
041:         * passed to a value's {@link AnnotationValue#accept accept} method,
042:         * the <tt>visit<i>XYZ</i></tt> method applicable to that value is
043:         * invoked.
044:         *
045:         * <p> Classes implementing this interface may or may not throw a
046:         * {@code NullPointerException} if the additional parameter {@code p}
047:         * is {@code null}; see documentation of the implementing class for
048:         * details.
049:         * 
050:         * <p> <b>WARNING:</b> It is possible that methods will be added to
051:         * this interface to accommodate new, currently unknown, language
052:         * structures added to future versions of the Java&trade; programming
053:         * language.  Therefore, visitor classes directly implementing this
054:         * interface may be source incompatible with future versions of the
055:         * platform.  To avoid this source incompatibility, visitor
056:         * implementations are encouraged to instead extend the appropriate
057:         * abstract visitor class that implements this interface.  However, an
058:         * API should generally use this visitor interface as the type for
059:         * parameters, return type, etc. rather than one of the abstract
060:         * classes.
061:         *
062:         * @param <R> the return type of this visitor's methods
063:         * @param <P> the type of the additional parameter to this visitor's methods.
064:         * @author Joseph D. Darcy
065:         * @author Scott Seligman
066:         * @author Peter von der Ah&eacute;
067:         * @version 1.12 07/05/05
068:         * @since 1.6
069:         */
070:        public interface AnnotationValueVisitor<R, P> {
071:            /**
072:             * Visits an annotation value.
073:             * @param av the value to visit
074:             * @param p a visitor-specified parameter
075:             * @return  a visitor-specified result
076:             */
077:            R visit(AnnotationValue av, P p);
078:
079:            /**
080:             * A convenience method equivalent to {@code v.visit(av, null)}.
081:             * @param av the value to visit
082:             * @return  a visitor-specified result
083:             */
084:            R visit(AnnotationValue av);
085:
086:            /**
087:             * Visits a {@code boolean} value in an annotation.
088:             * @param b the value being visited
089:             * @param p a visitor-specified parameter
090:             * @return the result of the visit
091:             */
092:            R visitBoolean(boolean b, P p);
093:
094:            /**
095:             * Visits a {@code byte} value in an annotation.
096:             * @param  b the value being visited
097:             * @param  p a visitor-specified parameter
098:             * @return the result of the visit
099:             */
100:            R visitByte(byte b, P p);
101:
102:            /**
103:             * Visits a {@code char} value in an annotation.
104:             * @param  c the value being visited
105:             * @param  p a visitor-specified parameter
106:             * @return the result of the visit
107:             */
108:            R visitChar(char c, P p);
109:
110:            /**
111:             * Visits a {@code double} value in an annotation.
112:             * @param  d the value being visited
113:             * @param  p a visitor-specified parameter
114:             * @return the result of the visit
115:             */
116:            R visitDouble(double d, P p);
117:
118:            /**
119:             * Visits a {@code float} value in an annotation.
120:             * @param  f the value being visited
121:             * @param  p a visitor-specified parameter
122:             * @return the result of the visit
123:             */
124:            R visitFloat(float f, P p);
125:
126:            /**
127:             * Visits an {@code int} value in an annotation.
128:             * @param  i the value being visited
129:             * @param  p a visitor-specified parameter
130:             * @return the result of the visit
131:             */
132:            R visitInt(int i, P p);
133:
134:            /**
135:             * Visits a {@code long} value in an annotation.
136:             * @param  i the value being visited
137:             * @param  p a visitor-specified parameter
138:             * @return the result of the visit
139:             */
140:            R visitLong(long i, P p);
141:
142:            /**
143:             * Visits a {@code short} value in an annotation.
144:             * @param  s the value being visited
145:             * @param  p a visitor-specified parameter
146:             * @return the result of the visit
147:             */
148:            R visitShort(short s, P p);
149:
150:            /**
151:             * Visits a string value in an annotation.
152:             * @param  s the value being visited
153:             * @param  p a visitor-specified parameter
154:             * @return the result of the visit
155:             */
156:            R visitString(String s, P p);
157:
158:            /**
159:             * Visits a type value in an annotation.
160:             * @param  t the value being visited
161:             * @param  p a visitor-specified parameter
162:             * @return the result of the visit
163:             */
164:            R visitType(TypeMirror t, P p);
165:
166:            /**
167:             * Visits an {@code enum} value in an annotation.
168:             * @param  c the value being visited
169:             * @param  p a visitor-specified parameter
170:             * @return the result of the visit
171:             */
172:            R visitEnumConstant(VariableElement c, P p);
173:
174:            /**
175:             * Visits an annotation value in an annotation.
176:             * @param  a the value being visited
177:             * @param  p a visitor-specified parameter
178:             * @return the result of the visit
179:             */
180:            R visitAnnotation(AnnotationMirror a, P p);
181:
182:            /**
183:             * Visits an array value in an annotation.
184:             * @param  vals the value being visited
185:             * @param  p a visitor-specified parameter
186:             * @return the result of the visit
187:             */
188:            R visitArray(List<? extends AnnotationValue> vals, P p);
189:
190:            /**
191:             * Visits an unknown kind of annotation value.
192:             * This can occur if the language evolves and new kinds
193:             * of value can be stored in an annotation.
194:             * @param  av the unknown value being visited
195:             * @param  p a visitor-specified parameter
196:             * @return the result of the visit
197:             * @throws UnknownAnnotationValueException
198:             *	a visitor implementation may optionally throw this exception
199:             */
200:            R visitUnknown(AnnotationValue av, P p);
201:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.