O'Reilly logo

Java 9: Building Robust Modular Applications by Jason Lee, Peter Verhas, Dr. Edward Lavieri

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

SHOW_HIDDEN_FRAMES

Finally the enum constant option, SHOW_HIDDEN_FRAMES will include all the hidden frames, which contain reflective calls as well as call frames that are generated for lambda function calls.

Here is a simple demonstration of reflective and hidden frames:

    package packt; 
    import static java.lang.StackWalker.Option.SHOW_HIDDEN_FRAMES; 
    import static java.lang.StackWalker.Option.SHOW_REFLECT_FRAMES; 
    public class Main { 

The main method allowing us to execute this code directly calls the method simpleCall():

    public static void main(String[] args) { 
      simpleCall(); 
    } 

The method simpleCall() simply calls on as the name suggests:

    static void simpleCall() { 
      reflectCall(); 
    } 

The next method in the chain is a bit more complex. Although ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required