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 ...

Get Java 9: Building Robust Modular Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.