共用方式為


StackWalker.ForEach(IConsumer) Method

Definition

Performs the given action on each element of StackFrame stream of the current thread, traversing from the top frame of the stack, which is the method calling this forEach method.

[Android.Runtime.Register("forEach", "(Ljava/util/function/Consumer;)V", "", ApiSince=34)]
public void ForEach (Java.Util.Functions.IConsumer? action);
[<Android.Runtime.Register("forEach", "(Ljava/util/function/Consumer;)V", "", ApiSince=34)>]
member this.ForEach : Java.Util.Functions.IConsumer -> unit

Parameters

action
IConsumer

an action to be performed on each StackFrame of the stack of the current thread

Attributes

Remarks

Performs the given action on each element of StackFrame stream of the current thread, traversing from the top frame of the stack, which is the method calling this forEach method.

This method is equivalent to calling <blockquote> walk(s -> { s.forEach(action); return null;);}</blockquote>

Java documentation for java.lang.StackWalker.forEach(java.util.function.Consumer<? super java.lang.StackWalker.StackFrame>).

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