Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Parameters(
- commandNames = "sound-cloud-filter",
- commandDescription = "Copy resolver data",
- separators = "=")
- public static class CmdOpts {
- @Parameter(
- names = {"-e", "--env"},
- required = true,
- description = "Environment to analyze data on",
- converter = EnvConverter.class)
- private Env env;
- @Parameter(
- // names = the rest of the parameters passed
- required = true,
- description = "Execution modes list")
- private List<Mode> modes;
- // needed for JCommander
- public CmdOpts() {
- }
- public CmdOpts(Env env, List<Mode> modes) {
- this.env = env;
- this.modes = modes;
- }
- @Override
- public String toString() {
- //noinspection StringBufferReplaceableByString
- final StringBuilder sb = new StringBuilder("CmdOpts(");
- sb.append("env=").append(env);
- sb.append(", modes=").append(modes);
- sb.append(')');
- return sb.toString();
- }
- @Override
- public void execute() {
- // interface Cmd is enforced here by CommandLauncher
- new SoundCloudFilter(this).run();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement