rpcObject
Helper to get RpcObject for a given RpcService
Resolution order:
If
T::classhas a companion that is an RpcObject, return it directly.If
T::classhas a companion that is an RpcObjectFactory, use the type arguments fromtypeOf<T>()to build the concrete RpcObject.Otherwise walk the supertypes of
T(preserving type arguments) and return the first supertype whose classifier's companion is an RpcObject or an RpcObjectFactory. For a factory, the type arguments used are taken from THAT supertype's kotlin.reflect.KType (so e.g.interface TypedStream : KsStream<Info>correctly supplies<Info>to the parent's factory even thoughTypedStreamitself has no type parameters).