sinkArtifacts

open override fun <T : Any> sinkArtifacts(tool: Tool, clazz: Class<T>, sink: ArtifactSink): Tool

Wrap a tool to sink artifacts of the specified type to the given sink. Handles both single artifacts and Iterables.

Parameters

tool

The tool to wrap

clazz

The class of artifacts to capture

sink

Where to send captured artifacts


open override fun <T : Any> sinkArtifacts(tool: Tool, clazz: Class<T>, sink: ArtifactSink, filter: (T) -> Boolean, transform: (T) -> Any): Tool

Wrap a tool to sink artifacts of the specified type to the given sink, with optional filtering and transformation.

Parameters

tool

The tool to wrap

clazz

The class of artifacts to capture

sink

Where to send captured artifacts

filter

Predicate to filter which artifacts to capture

transform

Function to transform artifacts before sinking