All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkus.cli.common.RunModeOption Maven / Gradle / Ivy

There is a newer version: 3.17.0.CR1
Show newest version
package io.quarkus.cli.common;

import picocli.CommandLine;

public class RunModeOption {

    @CommandLine.Option(names = { "-B",
            "--batch-mode" }, description = "Run in non-interactive (batch) mode.")
    boolean batchMode;

    // Allow the option variant, but don't crowd help
    @CommandLine.Option(names = { "--dryrun" }, hidden = true)
    boolean dryRun2 = false;

    @CommandLine.Option(names = { "--dry-run" }, description = "Show actions that would be taken.")
    boolean dryRun = false;

    public boolean isBatchMode() {
        return batchMode;
    }

    public boolean isDryRun() {
        return dryRun || dryRun2;
    }

    @Override
    public String toString() {
        return "RunModeOption [batchMode=" + batchMode + ", dryRun=" + isDryRun() + "]";
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy