< prev index next >

src/java.base/share/classes/java/lang/StackFrameInfo.java

Print this page

        

*** 27,46 **** import jdk.internal.access.JavaLangInvokeAccess; import jdk.internal.access.SharedSecrets; import java.lang.StackWalker.StackFrame; import java.lang.invoke.MethodType; class StackFrameInfo implements StackFrame { private final byte RETAIN_CLASS_REF = 0x01; private final static JavaLangInvokeAccess JLIA = SharedSecrets.getJavaLangInvokeAccess(); private final byte flags; ! private final Object memberName; ! private final short bci; private volatile StackTraceElement ste; /* * Create StackFrameInfo for StackFrameTraverser and LiveStackFrameTraverser * to use --- 27,49 ---- import jdk.internal.access.JavaLangInvokeAccess; import jdk.internal.access.SharedSecrets; import java.lang.StackWalker.StackFrame; import java.lang.invoke.MethodType; + import java.lang.reflect.Method; class StackFrameInfo implements StackFrame { private final byte RETAIN_CLASS_REF = 0x01; private final static JavaLangInvokeAccess JLIA = SharedSecrets.getJavaLangInvokeAccess(); private final byte flags; ! private Object memberName; ! private short bci; ! private ContinuationScope contScope; ! private volatile StackTraceElement ste; /* * Create StackFrameInfo for StackFrameTraverser and LiveStackFrameTraverser * to use
*** 55,64 **** --- 58,82 ---- // the capability check Class<?> declaringClass() { return JLIA.getDeclaringClass(memberName); } + void setMemberName(Method method) { + this.memberName = JLIA.newMemberName(method); + } + + void setBCI(short bci) { + this.bci = bci; + } + + void setContinuationScope(ContinuationScope contScope) { + this.contScope = contScope; + } + + protected void clear() { + } + // ----- implementation of StackFrame methods @Override public String getClassName() { return declaringClass().getName();
*** 114,123 **** --- 132,146 ---- public boolean isNativeMethod() { return JLIA.isNative(memberName); } @Override + public java.lang.String getContinuationScopeName() { + return contScope.getName(); + } + + @Override public String toString() { return toStackTraceElement().toString(); } @Override
< prev index next >