mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8186050: StackFrame should provide the method signature
Reviewed-by: alanb, bchristi, forax, plevart
This commit is contained in:
parent
f2a9034adf
commit
5d986605ca
7 changed files with 172 additions and 9 deletions
|
@ -29,6 +29,7 @@ import jdk.internal.misc.SharedSecrets;
|
|||
|
||||
import static java.lang.StackWalker.Option.*;
|
||||
import java.lang.StackWalker.StackFrame;
|
||||
import java.lang.invoke.MethodType;
|
||||
|
||||
class StackFrameInfo implements StackFrame {
|
||||
private final static JavaLangInvokeAccess JLIA =
|
||||
|
@ -78,6 +79,17 @@ class StackFrameInfo implements StackFrame {
|
|||
return JLIA.getName(memberName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MethodType getMethodType() {
|
||||
walker.ensureAccessEnabled(RETAIN_CLASS_REFERENCE);
|
||||
return JLIA.getMethodType(memberName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescriptor() {
|
||||
return JLIA.getMethodDescriptor(memberName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getByteCodeIndex() {
|
||||
// bci not available for native methods
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue