reactor-core/src/main/java/reactor/core/publisher/Hooks.java
public static void onLastOperator(Function<? super Publisher<Object>, ? extends Publisher<Object>> onLastOperator) {
		onLastOperator(onLastOperator.toString(), onLastOperator);
	}
public static void onLastOperator(Function<? super Publisher<Object>, ? extends Publisher<Object>> onLastOperator) {
		onLastOperator(onLastOperator.toString(), onLastOperator);
	}
public static void onLastOperator ( Function < ? super Publisher < Object > , ? extends Publisher < Object > > onLastOperator ) { onLastOperator ( onLastOperator . toString ( ) , onLastOperator ) ; }
Add a {@link Publisher} operator interceptor for the last operator created
in every flow ({@link Flux} or {@link Mono}). The passed function is applied
to the original operator {@link Publisher} and can return a different {@link Publisher},
on the condition that it generically maintains the same data type as the original.
<p>
Note that sub-hooks are cumulative, but invoking this method twice with the same
instance (or any instance that has the same `toString`) will result in only a single
instance being applied. See {@link #onLastOperator(String, Function)} for a variant
that allows you to name the sub-hooks (and thus replace them or remove them individually
later on). Can be fully reset via {@link #resetOnLastOperator()}.
<p>
This pointcut function cannot make use of {@link Flux}, {@link Mono} or
{@link ParallelFlux} APIs as it would lead to a recursive call to the hook: the
operator calls would effectively invoke onEachOperator from onEachOperator.

@param onLastOperator the sub-hook: a function to intercept last operation call
(e.g. {@code map(fn2)} in {@code flux.map(fn).map(fn2).subscribe()})

@see #onLastOperator(String, Function)
@see #resetOnLastOperator(String)
@see #resetOnLastOperator()
@see #onEachOperator(Function)
Add a { @link Publisher } operator interceptor for the last operator created in every flow ( { @link Flux } or { @link Mono } ) . The passed function is applied to the original operator { @link Publisher } and can return a different { @link Publisher } on the condition that it generically maintains the same data type as the original . <p > Note that sub - hooks are cumulative but invoking this method twice with the same instance ( or any instance that has the same toString ) will result in only a single instance being applied . See { @link #onLastOperator ( String Function ) } for a variant that allows you to name the sub - hooks ( and thus replace them or remove them individually later on ) . Can be fully reset via { @link #resetOnLastOperator () } . <p > This pointcut function cannot make use of { @link Flux } { @link Mono } or { @link ParallelFlux } APIs as it would lead to a recursive call to the hook : the operator calls would effectively invoke onEachOperator from onEachOperator .