comparison graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/ResolvedJavaMethod.java @ 18823:5a21cac1968f

Add utilities ModifiersProvider#isConcrete, ResolvedJavaMethod#hasReceiver, ResolvedJavaMethod#hasBytecodes to Graal API.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Sun, 11 Jan 2015 18:12:51 +0100
parents 8a2e6bc4384c
children f57d86eb036f
comparison
equal deleted inserted replaced
18822:fad37aaed6d2 18823:5a21cac1968f
171 * @see Method#getGenericParameterTypes() 171 * @see Method#getGenericParameterTypes()
172 */ 172 */
173 Type[] getGenericParameterTypes(); 173 Type[] getGenericParameterTypes();
174 174
175 /** 175 /**
176 * Returns {@code true} if this method can be inlined. 176 * Returns {@code true} if this method is not excluded from inlining and has associated Java
177 * bytecodes (@see {@link ResolvedJavaMethod#hasBytecodes()}).
177 */ 178 */
178 boolean canBeInlined(); 179 boolean canBeInlined();
179 180
180 /** 181 /**
181 * Returns {@code true} if the inlining of this method should be forced. 182 * Returns {@code true} if the inlining of this method should be forced.
267 } 268 }
268 } 269 }
269 return result; 270 return result;
270 } 271 }
271 272
273 /**
274 * Checks whether the method has bytecodes associated with it. Methods without bytecodes are
275 * either abstract or native methods.
276 *
277 * @return whether the definition of this method is Java bytecodes
278 */
279 default boolean hasBytecodes() {
280 return isConcrete() && !isNative();
281 }
282
283 /**
284 * Checks whether the method has a receiver parameter - i.e., whether it is not static.
285 *
286 * @return whether the method has a receiver parameter
287 */
288 default boolean hasReceiver() {
289 return !isStatic();
290 }
272 } 291 }