Companion
object Companion
Functions
Link copied to clipboard
fun wrapping(delegate: PropositionRepository, listener: DiceEventListener = DiceEventListener.DEV_NULL): EventEmittingPropositionRepository<out PropositionRepository>
Build the decorator over delegate, picking the shape that matches what delegate can do: when it implements SourceRevisionQueryCapable and ProvenanceSubtractionCapable, the returned instance does too and forwards to both, so a caller's as? probe on the wrapper answers the way it answers on the delegate. Over a delegate with only provenance subtraction, the wrapper carries that capability alone. Over a plain repository, the returned instance carries no source-revision or provenance-subtraction surface at all.