Sdílet prostřednictvím


StackWalker.GetInstance Method

Definition

Overloads

GetInstance(StackWalker+Option)
GetInstance(ICollection<StackWalker.Option>)

Returns a StackWalker instance with the given options specifying the stack frame information it can access.

GetInstance(ICollection<StackWalker.Option>, Int32)

Returns a StackWalker instance with the given options specifying the stack frame information it can access.

GetInstance(StackWalker+Option)

[Android.Runtime.Register("getInstance", "(Ljava/lang/StackWalker$Option;)Ljava/lang/StackWalker;", "", ApiSince=34)]
public static Java.Lang.StackWalker? GetInstance (Java.Lang.StackWalker.Option? option);
[<Android.Runtime.Register("getInstance", "(Ljava/lang/StackWalker$Option;)Ljava/lang/StackWalker;", "", ApiSince=34)>]
static member GetInstance : Java.Lang.StackWalker.Option -> Java.Lang.StackWalker

Parameters

Returns

Attributes

Applies to

GetInstance(ICollection<StackWalker.Option>)

Returns a StackWalker instance with the given options specifying the stack frame information it can access.

[Android.Runtime.Register("getInstance", "(Ljava/util/Set;)Ljava/lang/StackWalker;", "", ApiSince=34)]
public static Java.Lang.StackWalker? GetInstance (System.Collections.Generic.ICollection<Java.Lang.StackWalker.Option>? options);
[<Android.Runtime.Register("getInstance", "(Ljava/util/Set;)Ljava/lang/StackWalker;", "", ApiSince=34)>]
static member GetInstance : System.Collections.Generic.ICollection<Java.Lang.StackWalker.Option> -> Java.Lang.StackWalker

Parameters

options
ICollection<StackWalker.Option>

Option stack walking option

Returns

a StackWalker configured with the given options

Attributes

Remarks

Returns a StackWalker instance with the given options specifying the stack frame information it can access. If the given options is empty, this StackWalker is configured to skip all Option#SHOW_HIDDEN_FRAMES hidden frames and no Option#RETAIN_CLASS_REFERENCE class reference is retained.

If a security manager is present and the given options contains Option#RETAIN_CLASS_REFERENCE Option.RETAIN_CLASS_REFERENCE, it calls its SecurityManager#checkPermission checkPermission method for RuntimePermission("getStackWalkerWithClassReference").

Java documentation for java.lang.StackWalker.getInstance(java.util.Set<java.lang.StackWalker.Option>).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

GetInstance(ICollection<StackWalker.Option>, Int32)

Returns a StackWalker instance with the given options specifying the stack frame information it can access.

[Android.Runtime.Register("getInstance", "(Ljava/util/Set;I)Ljava/lang/StackWalker;", "", ApiSince=34)]
public static Java.Lang.StackWalker? GetInstance (System.Collections.Generic.ICollection<Java.Lang.StackWalker.Option>? options, int estimateDepth);
[<Android.Runtime.Register("getInstance", "(Ljava/util/Set;I)Ljava/lang/StackWalker;", "", ApiSince=34)>]
static member GetInstance : System.Collections.Generic.ICollection<Java.Lang.StackWalker.Option> * int -> Java.Lang.StackWalker

Parameters

options
ICollection<StackWalker.Option>

Option stack walking options

estimateDepth
Int32

Estimate number of stack frames to be traversed.

Returns

a StackWalker configured with the given options

Attributes

Remarks

Returns a StackWalker instance with the given options specifying the stack frame information it can access. If the given options is empty, this StackWalker is configured to skip all Option#SHOW_HIDDEN_FRAMES hidden frames and no Option#RETAIN_CLASS_REFERENCE class reference is retained.

If a security manager is present and the given options contains Option#RETAIN_CLASS_REFERENCE Option.RETAIN_CLASS_REFERENCE, it calls its SecurityManager#checkPermission checkPermission method for RuntimePermission("getStackWalkerWithClassReference").

The estimateDepth specifies the estimate number of stack frames this StackWalker will traverse that the StackWalker could use as a hint for the buffer size.

Java documentation for java.lang.StackWalker.getInstance(java.util.Set<java.lang.StackWalker.Option>, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to