The StackWalker class has four getInstance() static factory methods:
- getInstance(): This returns a StackWalker class instance configured to skip all hidden frames and the caller class reference
- getInstance(StackWalker.Option option): This creates a StackWalker class instance with the given option specifying the stack frame information it can access
- getInstance(Set<StackWalker.Option> options): This creates a StackWalker class instance with the given set of options
- getInstance(Set<StackWalker.Option> options, int estimatedDepth): This allows you to pass in the estimatedDepth parameter that specifies the estimated number of stack frames this instance will traverse so that the Java machine can allocate the appropriate ...