StackWalker.GetInstance Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| GetInstance(StackWalker+Option) | |
| GetInstance(ICollection<StackWalker.Option>) |
Returns a |
| GetInstance(ICollection<StackWalker.Option>, Int32) |
Returns a |
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
- option
- StackWalker.Option
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").
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.
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.