Source Code Cross Referenced for Declaration.java in  » IDE-Eclipse » jdt » com » sun » mirror » declaration » 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 » IDE Eclipse » jdt » com.sun.mirror.declaration 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * @(#)Declaration.java	1.6 04/07/16
003:         *
004:         * Copyright (c) 2004, Sun Microsystems, Inc.
005:         * All rights reserved.
006:         * 
007:         * Redistribution and use in source and binary forms, with or without
008:         * modification, are permitted provided that the following conditions are met:
009:         *
010:         *     * Redistributions of source code must retain the above copyright
011:         *       notice, this list of conditions and the following disclaimer.
012:         *     * Redistributions in binary form must reproduce the above copyright
013:         *       notice, this list of conditions and the following disclaimer in the
014:         *       documentation and/or other materials provided with the distribution.
015:         *     * Neither the name of the Sun Microsystems, Inc. nor the names of
016:         *       its contributors may be used to endorse or promote products derived from
017:         *       this software without specific prior written permission.
018:         * 
019:         * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
020:         * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
021:         * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
022:         * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
023:         * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
024:         * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
025:         * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
026:         * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
027:         * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
028:         * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
029:         * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
030:         */
031:
032:        package com.sun.mirror.declaration;
033:
034:        import java.lang.annotation.Annotation;
035:        import java.util.Collection;
036:
037:        import com.sun.mirror.type.*;
038:        import com.sun.mirror.util.*;
039:
040:        /**
041:         * Represents the declaration of a program element such as a package,
042:         * class, or method.  Each declaration represents a static, language-level
043:         * construct (and not, for example, a runtime construct of the virtual
044:         * machine), and typically corresponds one-to-one with a particular
045:         * fragment of source code.
046:         *
047:         * <p> Declarations should be compared using the {@link #equals(Object)}
048:         * method.  There is no guarantee that any particular declaration will
049:         * always be represented by the same object.
050:         *
051:         * @author Joseph D. Darcy
052:         * @author Scott Seligman
053:         * @version 1.6 04/07/16
054:         *
055:         * @see Declarations
056:         * @see TypeMirror
057:         * @since 1.5
058:         */
059:
060:        public interface Declaration {
061:
062:            /**
063:             * Tests whether an object represents the same declaration as this.
064:             *
065:             * @param obj  the object to be compared with this declaration
066:             * @return <tt>true</tt> if the specified object represents the same
067:             *		declaration as this
068:             */
069:            boolean equals(Object obj);
070:
071:            /**
072:             * Returns the text of the documentation ("javadoc") comment of
073:             * this declaration.
074:             *
075:             * @return the documentation comment of this declaration, or <tt>null</tt>
076:             *		if there is none
077:             */
078:            String getDocComment();
079:
080:            /**
081:             * Returns the annotations that are directly present on this declaration.
082:             *
083:             * @return the annotations directly present on this declaration;
084:             *		an empty collection if there are none
085:             */
086:            Collection<AnnotationMirror> getAnnotationMirrors();
087:
088:            /**
089:             * Returns the annotation of this declaration having the specified
090:             * type.  The annotation may be either inherited or directly
091:             * present on this declaration.
092:             *
093:             * <p> The annotation returned by this method could contain an element
094:             * whose value is of type <tt>Class</tt>.
095:             * This value cannot be returned directly:  information necessary to
096:             * locate and load a class (such as the class loader to use) is
097:             * not available, and the class might not be loadable at all.
098:             * Attempting to read a <tt>Class</tt> object by invoking the relevant
099:             * method on the returned annotation
100:             * will result in a {@link MirroredTypeException},
101:             * from which the corresponding {@link TypeMirror} may be extracted.
102:             * Similarly, attempting to read a <tt>Class[]</tt>-valued element
103:             * will result in a {@link MirroredTypesException}.
104:             *
105:             * <blockquote>
106:             * <i>Note:</i> This method is unlike
107:             * others in this and related interfaces.  It operates on run-time
108:             * reflective information -- representations of annotation types
109:             * currently loaded into the VM -- rather than on the mirrored
110:             * representations defined by and used throughout these
111:             * interfaces.  It is intended for callers that are written to
112:             * operate on a known, fixed set of annotation types.
113:             * </blockquote>
114:             *
115:             * @param <A>  the annotation type
116:             * @param annotationType  the <tt>Class</tt> object corresponding to
117:             *		the annotation type
118:             * @return the annotation of this declaration having the specified type
119:             *
120:             * @see #getAnnotationMirrors()
121:             */
122:            <A extends Annotation> A getAnnotation(Class<A> annotationType);
123:
124:            /**
125:             * Returns the modifiers of this declaration, excluding annotations.
126:             * Implicit modifiers, such as the <tt>public</tt> and <tt>static</tt>
127:             * modifiers of interface members, are included.
128:             *
129:             * @return the modifiers of this declaration in undefined order;
130:             *		an empty collection if there are none
131:             */
132:            Collection<Modifier> getModifiers();
133:
134:            /**
135:             * Returns the simple (unqualified) name of this declaration.
136:             * The name of a generic type does not include any reference
137:             * to its formal type parameters.
138:             * For example, the simple name of the interface declaration
139:             * {@code java.util.Set<E>} is <tt>"Set"</tt>.
140:             * If this declaration represents the empty package, an empty
141:             * string is returned.
142:             * If it represents a constructor, the simple name of its
143:             * declaring class is returned.
144:             *
145:             * @return the simple name of this declaration
146:             */
147:            String getSimpleName();
148:
149:            /**
150:             * Returns the source position of the beginning of this declaration.
151:             * Returns <tt>null</tt> if the position is unknown or not applicable.
152:             *
153:             * <p> This source position is intended for use in providing
154:             * diagnostics, and indicates only approximately where a declaration
155:             * begins.
156:             *
157:             * @return the source position of the beginning of this declaration,
158:             *		or null if the position is unknown or not applicable
159:             */
160:            SourcePosition getPosition();
161:
162:            /**
163:             * Applies a visitor to this declaration.
164:             *
165:             * @param v the visitor operating on this declaration
166:             */
167:            void accept(DeclarationVisitor v);
168:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.