< prev index next >

src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/meta/ResolvedJavaMethod.java

Print this page

442      * @see #getCodeSize()
443      * @return {@code getCodeSize() > 0}
444      */
445     default boolean hasBytecodes() {
446         return getCodeSize() > 0;
447     }
448 
449     /**
450      * Checks whether the method has a receiver parameter - i.e., whether it is not static.
451      *
452      * @return whether the method has a receiver parameter
453      */
454     default boolean hasReceiver() {
455         return !isStatic();
456     }
457 
458     /**
459      * Determines if this method is {@link java.lang.Object#Object()}.
460      */
461     default boolean isJavaLangObjectInit() {
462         return getDeclaringClass().isJavaLangObject() && getName().equals("<init>");
463     }
464 
465     /**
466      * Gets a speculation log that can be used when compiling this method to make new speculations
467      * and query previously failed speculations. The implementation may return a new
468      * {@link SpeculationLog} object each time this method is called so its the caller's
469      * responsibility to ensure the same speculation log is used throughout a compilation.
470      */
471     SpeculationLog getSpeculationLog();
472 }

442      * @see #getCodeSize()
443      * @return {@code getCodeSize() > 0}
444      */
445     default boolean hasBytecodes() {
446         return getCodeSize() > 0;
447     }
448 
449     /**
450      * Checks whether the method has a receiver parameter - i.e., whether it is not static.
451      *
452      * @return whether the method has a receiver parameter
453      */
454     default boolean hasReceiver() {
455         return !isStatic();
456     }
457 
458     /**
459      * Determines if this method is {@link java.lang.Object#Object()}.
460      */
461     default boolean isJavaLangObjectInit() {
462         return getDeclaringClass().isJavaLangObject() && (getName().equals("<init>") || getName().equals("<vnew>"));
463     }
464 
465     /**
466      * Gets a speculation log that can be used when compiling this method to make new speculations
467      * and query previously failed speculations. The implementation may return a new
468      * {@link SpeculationLog} object each time this method is called so its the caller's
469      * responsibility to ensure the same speculation log is used throughout a compilation.
470      */
471     SpeculationLog getSpeculationLog();
472 }
< prev index next >