To provide additional options, bind a DynamicBean. For example:
bind(com.google.gerrit.server.DynamicOptions.DynamicBean.class)
.annotatedWith(Exports.named(com.google.gerrit.sshd.commands.Query.class))
.to(MyOptions.class);
To define the additional options, implement this interface. For example:
public class MyOptions implements DynamicOptions.DynamicBean {
@Option(name = "--verbose", aliases = {"-v"}
usage = "Make the operation more talkative")
public boolean verbose;
}
The option will be prefixed by the plugin name. In the example above, if the plugin name was
my-plugin, then the --verbose option as used by the caller would be --my-plugin--verbose.