< prev index next >

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

Print this page

        

@@ -27,20 +27,23 @@
 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 final Object memberName;
-    private final short bci;
+    private Object memberName;
+    private short bci;
+    private ContinuationScope contScope;
+
     private volatile StackTraceElement ste;
 
     /*
      * Create StackFrameInfo for StackFrameTraverser and LiveStackFrameTraverser
      * to use

@@ -55,10 +58,25 @@
     // 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,10 +132,15 @@
     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 >