public CommandLine addMixin(String name, Object mixin) {
        getCommandSpec().addMixin(name, CommandSpec.forAnnotatedObject(mixin, factory));
        return this;
    }
public CommandLine addMixin ( String name , Object mixin ) { getCommandSpec ( ) . addMixin ( name , CommandSpec . forAnnotatedObject ( mixin , factory ) ) ; return this ; }
Adds the options and positional parameters in the specified mixin to this command.
<p>The specified object may be a {@link CommandSpec CommandSpec} object, or it may be a user object with
{@code @Option} and {@code @Parameters}-annotated fields, in which case picocli automatically
constructs a {@code CommandSpec} from this user object.
</p>
@param name the name by which the mixin object may later be retrieved
@param mixin an annotated user object or a {@link CommandSpec CommandSpec} object whose options and positional parameters to add to this command
@return this CommandLine object, to allow method chaining
@since 3.0