@SuppressWarnings("unchecked")
	protected static <T> Flux<T> onAssembly(Flux<T> source) {
		Function<Publisher, Publisher> hook = Hooks.onEachOperatorHook;
		if(hook != null) {
			source = (Flux<T>) hook.apply(source);
		}
		if (Hooks.GLOBAL_TRACE) {
			AssemblySnapshot stacktrace = new AssemblySnapshot(null, Traces.callSiteSupplierFactory.get());
			source = (Flux<T>) Hooks.addAssemblyInfo(source, stacktrace);
		}
		return source;
	}
@SuppressWarnings("unchecked")
	protected static <T> Flux<T> onAssembly(Flux<T> source) {
		Function<Publisher, Publisher> hook = Hooks.onEachOperatorHook;
		if(hook != null) {
			source = (Flux<T>) hook.apply(source);
		}
		if (Hooks.GLOBAL_TRACE) {
			AssemblySnapshot stacktrace = new AssemblySnapshot(null, Traces.callSiteSupplierFactory.get());
			source = (Flux<T>) Hooks.addAssemblyInfo(source, stacktrace);
		}
		return source;
	}
@ SuppressWarnings ( "unchecked" ) protected static < T > Flux < T > onAssembly ( Flux < T > source ) { Function < Publisher , Publisher > hook = Hooks . onEachOperatorHook ; if ( hook != null ) { source = ( Flux < T > ) hook . apply ( source ) ; } if ( Hooks . GLOBAL_TRACE ) { AssemblySnapshot stacktrace = new AssemblySnapshot ( null , Traces . callSiteSupplierFactory . get ( ) ) ; source = ( Flux < T > ) Hooks . addAssemblyInfo ( source , stacktrace ) ; } return source ; }
To be used by custom operators: invokes assembly {@link Hooks} pointcut given a
{@link Flux}, potentially returning a new {@link Flux}. This is for example useful
to activate cross-cutting concerns at assembly time, eg. a generalized
{@link #checkpoint()}.

@param <T> the value type
@param source the source to apply assembly hooks onto

@return the source, potentially wrapped with assembly time cross-cutting behavior
To be used by custom operators : invokes assembly { @link Hooks } pointcut given a { @link Flux } potentially returning a new { @link Flux } . This is for example useful to activate cross - cutting concerns at assembly time eg . a generalized { @link #checkpoint () } .