8304139: Add <init> and <clinit> method constants to ConstantDescs

Reviewed-by: mchung
This commit is contained in:
Chen Liang 2023-03-21 16:16:08 +00:00 committed by Mandy Chung
parent d6f20e2fbf
commit 019fcd819c
7 changed files with 56 additions and 21 deletions

View file

@ -30,6 +30,7 @@ import jdk.internal.misc.VM;
import jdk.internal.module.ModuleHashes;
import jdk.internal.module.ModuleReferenceImpl;
import java.lang.constant.ConstantDescs;
import java.lang.module.ModuleReference;
import java.lang.module.ResolvedModule;
import java.util.HashSet;
@ -262,9 +263,9 @@ public final class StackTraceElement implements java.io.Serializable {
* Returns the name of the method containing the execution point
* represented by this stack trace element. If the execution point is
* contained in an instance or class initializer, this method will return
* the appropriate <i>special method name</i>, {@code <init>} or
* {@code <clinit>}, as per Section {@jvms 3.9} of <cite>The Java Virtual
* Machine Specification</cite>.
* the appropriate <i>special method name</i>, {@value ConstantDescs#INIT_NAME}
* or {@value ConstantDescs#CLASS_INIT_NAME}, as per Section {@jvms 3.9}
* of <cite>The Java Virtual Machine Specification</cite>.
*
* @return the name of the method containing the execution point
* represented by this stack trace element.