Invoker 上面有一个 AbstractCmd 属性,构造函数负责初始化它。还有一个 execute 方法,负责接受参数并调用 cmd.execute。

场景类里,new 一个 Command,用 cmd 作为参数 new 一个 Invoker,然后 invoker.execute(参数)。