Stack-Walking API

suggest change

Versions

[{“Name”:“Java SE 9 (Early Access)”,“GroupName”:null}]

Introduction

Prior to Java 9, access to the thread stack frames was limited to an internal class sun.reflect.Reflection. Specifically the method sun.reflect.Reflection::getCallerClass. Some libraries relies on this method which is deprecated.

An alternative standard API is now provided in JDK 9 via the java.lang.StackWalker class, and is designed to be efficient by allowing lazy access to the stack frames. Some applications may use this API to traverse the execution stack and filter on classes.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents