addPairInterfaceFrom<InterfaceType extends PairInterface> method

InterfaceType addPairInterfaceFrom<InterfaceType extends PairInterface>(
  1. InterfaceType target,
  2. PairInterface source,
  3. PairRole role, {
  4. String uniquify(
    1. String original
    )?,
})

Registers an already-constructed target against source for cases where a module intentionally changes the concrete pair-interface type.

Prefer addPairInterface when the internal interface has the same type as the external interface. This method keeps the exceptional retyped connection pattern behind the same HCL registration seam.

Implementation

InterfaceType addPairInterfaceFrom<InterfaceType extends PairInterface>(
  InterfaceType target,
  PairInterface source,
  PairRole role, {
  String Function(String original)? uniquify,
}) {
  target.pairConnectIO(this, source, role, uniquify: uniquify);
  return target;
}