[ Web Proxy ]
URL:
Viewing: https://developer.android.com/reference/java/lang/StackWalker.Option [Back]  [Original]

StackWalker.Option  |  API reference  |  Android Developers Skip to main content
Essentials Design & Plan Develop Google Play Blog
Search:
Android Studio
Android Developers [Android Developers]
Stay organized with collections Save and categorize content based on your preferences.

StackWalker.Option

public static final enum StackWalker.Option
extends Enum<StackWalker.Option>

java.lang.Object
   ↳ java.lang.Enum<java.lang.StackWalker.Option>
     ↳ java.lang.StackWalker.Option


Stack walker option to configure the stack frame information obtained by a StackWalker.

Summary

Enum values

StackWalker.Option  RETAIN_CLASS_REFERENCE

Retains Class object in StackFrames walked by this StackWalker

StackWalker.Option  SHOW_HIDDEN_FRAMES

Shows all hidden frames. 

StackWalker.Option  SHOW_REFLECT_FRAMES

Shows all reflection frames. 

Public methods

static StackWalker.Option valueOf(String name)
static final Option[] values()

Inherited methods

Enum values

RETAIN_CLASS_REFERENCE

Added in API level 34
public static final StackWalker.Option RETAIN_CLASS_REFERENCE

Retains Class object in StackFrames walked by this StackWalker.

A StackWalker configured with this option will support StackWalker.getCallerClass() and StackFrame.getDeclaringClass().

SHOW_HIDDEN_FRAMES

Added in API level 34
public static final StackWalker.Option SHOW_HIDDEN_FRAMES

Shows all hidden frames.

A Java Virtual Machine implementation may hide implementation specific frames in addition to reflection frames. A StackWalker with this SHOW_HIDDEN_FRAMES option will show all hidden frames (including reflection frames).

SHOW_REFLECT_FRAMES

Added in API level 34
public static final StackWalker.Option SHOW_REFLECT_FRAMES

Shows all reflection frames.

By default, reflection frames are hidden. A StackWalker configured with this SHOW_REFLECT_FRAMES option will show all reflection frames that include Method.invoke(Object, Object) and java.lang.reflect.Constructor.newInstance(Object...) and their reflection implementation classes.

The SHOW_HIDDEN_FRAMES option can also be used to show all reflection frames and it will also show other hidden frames that are implementation-specific.

Public methods

valueOf

public static StackWalker.Option valueOf (String name)

Parameters
name String

Returns
StackWalker.Option

values

public static final Option[] values ()

Returns
Option[]

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2026-08-03 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-03 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page