of

fun of(name: String, type: Class<*>, aliases: Set<String> = emptySet()): CommandType

A CommandType of the given fields; parameters added later come last, with a default.


fun of(aggregate: AggregateType, commandClass: Class<*>): CommandType

The command type of commandClass, a command aggregate decides or mounts, named as its model names it: context.aggregate.Name, the class's @Name else its simple name. What a CommandTransformer takes or gives, without writing the name by hand. A @MountedCommand class is mounted under the aggregate its annotation names: another aggregate fails here, where the transformer is built.