Source Code Cross Referenced for IMethod.java in  » IDE-Eclipse » jdt » org » eclipse » jdt » core » 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 » org.eclipse.jdt.core 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*******************************************************************************
002:         * Copyright (c) 2000, 2007 IBM Corporation and others.
003:         * All rights reserved. This program and the accompanying materials
004:         * are made available under the terms of the Eclipse Public License v1.0
005:         * which accompanies this distribution, and is available at
006:         * http://www.eclipse.org/legal/epl-v10.html
007:         *
008:         * Contributors:
009:         *     IBM Corporation - initial API and implementation
010:         *     IBM Corporation - added J2SE 1.5 support
011:         *******************************************************************************/package org.eclipse.jdt.core;
012:
013:        /**
014:         * Represents a method (or constructor) declared in a type.
015:         * <p>
016:         * This interface is not intended to be implemented by clients.
017:         * </p>
018:         */
019:        public interface IMethod extends IMember {
020:            /**
021:             * Returns the simple name of this method.
022:             * For a constructor, this returns the simple name of the declaring type.
023:             * Note: This holds whether the constructor appears in a source or binary type
024:             * (even though class files internally define constructor names to be <code>"&lt;init&gt;"</code>).
025:             * For the class initialization methods in binary types, this returns
026:             * the special name <code>"&lt;clinit&gt;"</code>.
027:             * This is a handle-only method.
028:             * @return the simple name of this method
029:             */
030:            String getElementName();
031:
032:            /**
033:             * Returns the type signatures of the exceptions this method throws,
034:             * in the order declared in the source. Returns an empty array
035:             * if this method throws no exceptions.
036:             * <p>
037:             * For example, a source method declaring <code>"throws IOException"</code>,
038:             * would return the array <code>{"QIOException;"}</code>.
039:             * </p>
040:             * <p>
041:             * The type signatures may be either unresolved (for source types)
042:             * or resolved (for binary types), and either basic (for basic types)
043:             * or rich (for parameterized types). See {@link Signature} for details.
044:             * </p>
045:             *
046:             * @exception JavaModelException if this element does not exist or if an
047:             *      exception occurs while accessing its corresponding resource.
048:             * @return the type signatures of the exceptions this method throws,
049:             * in the order declared in the source, an empty array if this method throws no exceptions
050:             * @see Signature
051:             */
052:            String[] getExceptionTypes() throws JavaModelException;
053:
054:            /**
055:             * Returns the formal type parameter signatures for this method.
056:             * Returns an empty array if this method has no formal type parameters.
057:             * <p>
058:             * The formal type parameter signatures may be either unresolved (for source
059:             * types) or resolved (for binary types). See {@link Signature} for details.
060:             * </p>
061:             *
062:             * @exception JavaModelException if this element does not exist or if an
063:             *      exception occurs while accessing its corresponding resource.
064:             * @return the formal type parameter signatures of this method,
065:             * in the order declared in the source, an empty array if none
066:             * @see Signature
067:             * @since 3.0
068:             * @deprecated Use {@link #getTypeParameters()} instead
069:             */
070:            String[] getTypeParameterSignatures() throws JavaModelException;
071:
072:            /**
073:             * Returns the formal type parameters for this method.
074:             * Returns an empty array if this method has no formal type parameters.
075:             *
076:             * @exception JavaModelException if this element does not exist or if an
077:             *      exception occurs while accessing its corresponding resource.
078:             * @return the formal type parameters of this method,
079:             * in the order declared in the source, an empty array if none
080:             * @since 3.1
081:             */
082:            ITypeParameter[] getTypeParameters() throws JavaModelException;
083:
084:            /**
085:             * Returns the number of parameters of this method.
086:             * This is a handle-only method.
087:             * 
088:             * @return the number of parameters of this method
089:             */
090:            int getNumberOfParameters();
091:
092:            /**
093:             * Returns the binding key for this method. A binding key is a key that uniquely
094:             * identifies this method. It allows access to generic info for parameterized
095:             * methods.
096:             * 
097:             * @return the binding key for this method
098:             * @see org.eclipse.jdt.core.dom.IBinding#getKey()
099:             * @see BindingKey
100:             * @since 3.1
101:             */
102:            String getKey();
103:
104:            /**
105:             * Returns the names of parameters in this method.
106:             * For binary types, associated source or attached Javadoc are used to retrieve the names.
107:             * If none can be retrieved, then these names are invented as "arg"+i, where i starts at 0.
108:             * Returns an empty array if this method has no parameters.
109:             *
110:             * <p>For example, a method declared as <code>public void foo(String text, int length)</code>
111:             * would return the array <code>{"text","length"}</code>.
112:             * </p>
113:             *
114:             * @exception JavaModelException if this element does not exist or if an
115:             *      exception occurs while accessing its corresponding resource.
116:             * @return the names of parameters in this method, an empty array if this method has no parameters
117:             */
118:            String[] getParameterNames() throws JavaModelException;
119:
120:            /**
121:             * Returns the type signatures for the parameters of this method.
122:             * Returns an empty array if this method has no parameters.
123:             * This is a handle-only method.
124:             * <p>
125:             * For example, a source method declared as <code>public void foo(String text, int length)</code>
126:             * would return the array <code>{"QString;","I"}</code>.
127:             * </p>
128:             * <p>
129:             * The type signatures may be either unresolved (for source types)
130:             * or resolved (for binary types), and either basic (for basic types)
131:             * or rich (for parameterized types). See {@link Signature} for details.
132:             * </p>
133:             * 
134:             * @return the type signatures for the parameters of this method, an empty array if this method has no parameters
135:             * @see Signature
136:             */
137:            String[] getParameterTypes();
138:
139:            /**
140:             * Returns the names of parameters in this method.
141:             * For binary types, these names are invented as "arg"+i, where i starts at 0 
142:             * (even if source is associated with the binary or if Javdoc is attached to the binary).
143:             * Returns an empty array if this method has no parameters.
144:             *
145:             * <p>For example, a method declared as <code>public void foo(String text, int length)</code>
146:             * would return the array <code>{"text","length"}</code>. For the same method in a
147:             * binary, this would return <code>{"arg0", "arg1"}</code>.
148:             * </p>
149:             *
150:             * @exception JavaModelException if this element does not exist or if an
151:             *      exception occurs while accessing its corresponding resource.
152:             * @return the names of parameters in this method, an empty array if this method has no parameters
153:             * @since 3.2
154:             */
155:            String[] getRawParameterNames() throws JavaModelException;
156:
157:            /**
158:             * Returns the type signature of the return value of this method.
159:             * For constructors, this returns the signature for void.
160:             * <p>
161:             * For example, a source method declared as <code>public String getName()</code>
162:             * would return <code>"QString;"</code>.
163:             * </p>
164:             * <p>
165:             * The type signature may be either unresolved (for source types)
166:             * or resolved (for binary types), and either basic (for basic types)
167:             * or rich (for parameterized types). See {@link Signature} for details.
168:             * </p>
169:             *
170:             * @exception JavaModelException if this element does not exist or if an
171:             *      exception occurs while accessing its corresponding resource.
172:             * @return the type signature of the return value of this method, void  for constructors
173:             * @see Signature
174:             */
175:            String getReturnType() throws JavaModelException;
176:
177:            /**
178:             * Returns the signature of this method. This includes the signatures for the
179:             * parameter types and return type, but does not include the method name,
180:             * exception types, or type parameters.
181:             * <p>
182:             * For example, a source method declared as <code>public void foo(String text, int length)</code>
183:             * would return <code>"(QString;I)V"</code>.
184:             * </p>
185:             * <p>
186:             * The type signatures embedded in the method signature may be either unresolved
187:             * (for source types) or resolved (for binary types), and either basic (for
188:             * basic types) or rich (for parameterized types). See {@link Signature} for
189:             * details.
190:             * </p>
191:             *
192:             * @return the signature of this method
193:             * @exception JavaModelException if this element does not exist or if an
194:             *      exception occurs while accessing its corresponding resource.
195:             * @see Signature
196:             */
197:            String getSignature() throws JavaModelException;
198:
199:            /**
200:             * Returns the type parameter declared in this method with the given name.
201:             * This is a handle-only method. The type parameter may or may not exist.
202:             * 
203:             * @param name the given simple name
204:             * @return the type parameter declared in this method with the given name
205:             * @since 3.1
206:             */
207:            ITypeParameter getTypeParameter(String name);
208:
209:            /**
210:             * Returns whether this method is a constructor.
211:             *
212:             * @exception JavaModelException if this element does not exist or if an
213:             *      exception occurs while accessing its corresponding resource.
214:             * 
215:             * @return true if this method is a constructor, false otherwise
216:             */
217:            boolean isConstructor() throws JavaModelException;
218:
219:            /**
220:             * Returns whether this method is a main method.
221:             * It is a main method if:
222:             * <ul>
223:             * <li>its name is equal to <code>"main"</code></li>
224:             * <li>its return type is <code>void</code></li>
225:             * <li>it is <code>static</code> and <code>public</code></li>
226:             * <li>it defines one parameter whose type's simple name is <code>String[]</code></li>
227:             * </ul>
228:             * 
229:             * @exception JavaModelException if this element does not exist or if an
230:             *      exception occurs while accessing its corresponding resource.
231:             * @since 2.0
232:             * @return true if this method is a main method, false otherwise
233:             */
234:            boolean isMainMethod() throws JavaModelException;
235:
236:            /**
237:             * Returns whether this method represents a resolved method.
238:             * If a method is resoved, its key contains resolved information.
239:             * 
240:             * @return whether this method represents a resolved method.
241:             * @since 3.1
242:             */
243:            boolean isResolved();
244:
245:            /**
246:             * Returns whether this method is similar to the given method.
247:             * Two methods are similar if:
248:             * <ul>
249:             * <li>their element names are equal</li>
250:             * <li>they have the same number of parameters</li>
251:             * <li>the simple names of their parameter types are equal</li>
252:             * </ul>
253:             * This is a handle-only method.
254:             * 
255:             * @param method the given method
256:             * @return true if this method is similar to the given method.
257:             * @see Signature#getSimpleName(char[])
258:             * @since 2.0
259:             */
260:            boolean isSimilar(IMethod method);
261:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.