public static interface CommandLine.IModelTransformer
Commands may configure a model transformer using the
CommandLine.Command.modelTransformer()
annotation attribute, or via the
CommandSpec#modelTransformer(IModelTransformer)
programmatic API.
Model transformers are invoked only once, after the full command hierarchy is constructed.
Modifier and Type | Method and Description |
---|---|
CommandLine.Model.CommandSpec |
transform(CommandLine.Model.CommandSpec commandSpec)
Given an original CommandSpec, return the object that should be used
instead.
|
CommandLine.Model.CommandSpec transform(CommandLine.Model.CommandSpec commandSpec)
Implementors are free to add or remove options, positional parameters, subcommands or modify the command in any other way.
This method is called once, after the full command hierarchy is constructed, and before any command line arguments are parsed.