Source Code Cross Referenced for CtElement.java in  » Code-Analyzer » Spoon » spoon » reflect » 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 » Code Analyzer » Spoon » spoon.reflect.declaration 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* 
002:         * Spoon - http://spoon.gforge.inria.fr/
003:         * Copyright (C) 2006 INRIA Futurs <renaud.pawlak@inria.fr>
004:         * 
005:         * This software is governed by the CeCILL-C License under French law and
006:         * abiding by the rules of distribution of free software. You can use, modify 
007:         * and/or redistribute the software under the terms of the CeCILL-C license as 
008:         * circulated by CEA, CNRS and INRIA at http://www.cecill.info. 
009:         * 
010:         * This program is distributed in the hope that it will be useful, but WITHOUT 
011:         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
012:         * FITNESS FOR A PARTICULAR PURPOSE. See the CeCILL-C License for more details.
013:         *  
014:         * The fact that you are presently reading this means that you have had
015:         * knowledge of the CeCILL-C license and that you accept its terms.
016:         */
017:
018:        package spoon.reflect.declaration;
019:
020:        import java.lang.annotation.Annotation;
021:        import java.util.List;
022:        import java.util.Set;
023:
024:        import spoon.processing.FactoryAccessor;
025:        import spoon.reflect.cu.SourcePosition;
026:        import spoon.reflect.reference.CtTypeReference;
027:        import spoon.reflect.visitor.CtVisitor;
028:        import spoon.reflect.visitor.Filter;
029:        import spoon.reflect.visitor.Root;
030:
031:        /**
032:         * This interface is the root interface for the metamodel elements (any program
033:         * element).
034:         */
035:        @Root
036:        public interface CtElement extends FactoryAccessor,
037:                Comparable<CtElement> {
038:            /**
039:             * Accepts a visitor.
040:             * 
041:             * @param visitor
042:             *            to accept
043:             */
044:            void accept(CtVisitor visitor);
045:
046:            /**
047:             * Searches for an annotation (proxy) of the given class that annotates the
048:             * current element.
049:             * 
050:             * <p>
051:             * NOTE: before using an annotation proxy, you have to make sure that all
052:             * the types referenced by the annotation have been compiled and are in the
053:             * classpath so that accessed values can be converted into the actual types.
054:             * Otherwise, use {@link #getAnnotation(CtTypeReference)}.
055:             * 
056:             * @param <A>
057:             *            the annotation's type
058:             * @param annotationType
059:             *            the annotation's class
060:             * @return if found, returns a proxy for this annotation
061:             */
062:            <A extends Annotation> A getAnnotation(Class<A> annotationType);
063:
064:            /**
065:             * Gets the annotation element for a given annotation type.
066:             * 
067:             * @param annotationType
068:             *            the annotation type
069:             * @return the annotation if this element is annotated by one annotation of
070:             *         the given type
071:             */
072:            <A extends Annotation> CtAnnotation<A> getAnnotation(
073:                    CtTypeReference<A> annotationType);
074:
075:            /**
076:             * Returns the annotations that are present on this element.
077:             */
078:            Set<CtAnnotation<? extends Annotation>> getAnnotations();
079:
080:            /**
081:             * Returns the text of the documentation ("javadoc") comment of this
082:             * element.
083:             */
084:            String getDocComment();
085:
086:            /**
087:             * Gets the parent of current element.
088:             */
089:            CtElement getParent();
090:
091:            /**
092:             * Gets the signature of the element.
093:             */
094:            String getSignature();
095:
096:            /**
097:             * Gets the first parent that matches the given type.
098:             */
099:            <P extends CtElement> P getParent(Class<P> parentType);
100:
101:            /**
102:             * Tells if the given element is a direct or indirect parent.
103:             */
104:            boolean hasParent(CtElement candidate);
105:
106:            /**
107:             * Gets the position of this element in input source files
108:             * 
109:             * @return Source file and line number of this element or null
110:             */
111:            SourcePosition getPosition();
112:
113:            /**
114:             * Replaces this element by another one.
115:             */
116:            void replace(CtElement element);
117:
118:            /**
119:             * Replaces the elements that match the filter by the given element.
120:             */
121:            void replace(Filter<? extends CtElement> replacementPoints,
122:                    CtElement element);
123:
124:            /**
125:             * Sets the annotations for this element.
126:             */
127:            void setAnnotations(
128:                    Set<CtAnnotation<? extends Annotation>> annotation);
129:
130:            /**
131:             * Sets the text of the documentation ("javadoc") comment of this
132:             * declaration.
133:             */
134:            void setDocComment(String docComment);
135:
136:            /**
137:             * Sets the parent element of the current element.
138:             * 
139:             * @param element
140:             *            parent
141:             */
142:            void setParent(CtElement element);
143:
144:            /**
145:             * Sets the position in the Java source file. Note that this information is
146:             * used to feed the line numbers in the generated bytecode if any (which is
147:             * useful for debugging).
148:             * 
149:             * @param position
150:             *            of this element in the input source files
151:             */
152:            void setPosition(SourcePosition position);
153:
154:            /**
155:             * Sets the position of this element and all its children element. Note that
156:             * this information is used to feed the line numbers in the generated
157:             * bytecode if any (which is useful for debugging).
158:             * 
159:             * @param position
160:             *            of this element and all children in the input source file
161:             */
162:            void setPositions(SourcePosition position);
163:
164:            /**
165:             * Gets the child elements annotated with the given annotation type's
166:             * instances.
167:             * 
168:             * @param <E>
169:             *            the element's type
170:             * @param annotationType
171:             *            the annotation type
172:             * @return all the child elements annotated with an instance of the given
173:             *         annotation type
174:             */
175:            <E extends CtElement> List<E> getAnnotatedChildren(
176:                    Class<? extends Annotation> annotationType);
177:
178:            /**
179:             * Returns true if this element is implicit and automatically added by the
180:             * Java compiler.
181:             */
182:            boolean isImplicit();
183:
184:            /**
185:             * Sets this element to be implicit (will not be printed).
186:             */
187:            void setImplicit(boolean b);
188:
189:            /**
190:             * Calculates and returns the set of all the types referenced by this
191:             * element (and sub-elements in the AST).
192:             */
193:            Set<CtTypeReference<?>> getReferencedTypes();
194:
195:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.